com.fasterxml.jackson.databind

Class ObjectMapper

  • All Implemented Interfaces:
    Versioned, Serializable


    public class ObjectMapper
    extends ObjectCodec
    implements Versioned, Serializable
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (instances of JDK provided core classes, beans), and matching JSON constructs. It will use instances of JsonParser and JsonGenerator for implementing actual reading/writing of JSON.

    The main conversion API is defined in ObjectCodec, so that implementation details of this class need not be exposed to streaming parser and generator classes.

    Note on caching: root-level deserializers are always cached, and accessed using full (generics-aware) type information. This is different from caching of referenced types, which is more limited and is done only for a subset of all deserializer types. The main reason for difference is that at root-level there is no incoming reference (and hence no referencing property, no referral information or annotations to produce differing deserializers), and that the performance impact greatest at root level (since it'll essentially cache the full graph of deserializers involved).

    See Also:
    Serialized Form

Copyright © 2014 FasterXML. All Rights Reserved.