Class JSONSerializers


  • Deprecated. 
    This class has been superseded by to toJson and parse methods on BasicDBObject

    @Deprecated
    public class JSONSerializers
    extends java.lang.Object
    Defines static methods for getting ObjectSerializer instances that produce various flavors of JSON.
    See Also:
    JsonReader, JsonWriter, BasicDBObject.toJson(), BasicDBObject.parse(String)
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static ObjectSerializer getLegacy​()
      Deprecated. 
      Returns an ObjectSerializer that mostly conforms to the strict JSON format defined in extended JSON, but with a few differences to keep compatibility with previous versions of the driver.
      static ObjectSerializer getStrict​()
      Deprecated. 
      Returns an ObjectSerializer that conforms to the strict JSON format defined in extended JSON.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getLegacy

        public static ObjectSerializer getLegacy​()
        Deprecated. 
        Returns an ObjectSerializer that mostly conforms to the strict JSON format defined in extended JSON, but with a few differences to keep compatibility with previous versions of the driver. Clients should generally prefer getStrict in preference to this method.
        Returns:
        object serializer
        See Also:
        getStrict()
        MongoDB documentation
        MongoDB Extended JSON