According to the documetation of
Most mutators, however, need to be accessed through specific sub-classes (such as
However I am still confused since some stackoverflow answers seem to use them quite interchangeably. What different purpose do they serve?
JsonNode is a base class that
JsonNode represents any valid Json structure whereas
ArrayNode are particular implementations for objects (aka maps) and arrays, respectively.
ArrayNode has specific methods for dealing with arrays such as
get(index i) E.g. you cannot get an item at a specific index in a
ObjectNode but you can in an