Package com.mongodb.util
Class JSONCallback
- java.lang.Object
-
- org.bson.BasicBSONCallback
-
- com.mongodb.util.JSONCallback
-
- All Implemented Interfaces:
BSONCallback
Deprecated.This class has been superseded by to toJson and parse methods on BasicDBObject
@Deprecated public class JSONCallback extends BasicBSONCallback
Converts JSON to DBObjects and vice versa.
-
-
Field Summary
Fields Modifier and Type Field Description static String
_msDateFormat
Deprecated.static String
_secDateFormat
Deprecated.
-
Constructor Summary
Constructors Constructor Description JSONCallback()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
arrayStart(String name)
Deprecated.Signals the start of a BSON array, with its field name.BSONObject
create()
Deprecated.Factory method for creating a new BSONObject.protected BSONObject
createList()
Deprecated.Factory method for creating a new BSON List.Object
objectDone()
Deprecated.Called at the end of the document/array, and returns this object.void
objectStart(String name)
Deprecated.Signals the start of a BSON document, which usually maps onto some Java object.-
Methods inherited from class org.bson.BasicBSONCallback
_put, arrayDone, arrayStart, create, createBSONCallback, cur, curName, get, gotBinary, gotBinaryArray, gotBoolean, gotCode, gotCodeWScope, gotDate, gotDBRef, gotDecimal128, gotDouble, gotInt, gotLong, gotMaxKey, gotMinKey, gotNull, gotObjectId, gotRegex, gotString, gotSymbol, gotTimestamp, gotUndefined, gotUUID, isStackEmpty, objectStart, reset, setRoot
-
-
-
-
Field Detail
-
_msDateFormat
public static final String _msDateFormat
Deprecated.- See Also:
- Constant Field Values
-
_secDateFormat
public static final String _secDateFormat
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public BSONObject create()
Deprecated.Description copied from class:BasicBSONCallback
Factory method for creating a new BSONObject.- Overrides:
create
in classBasicBSONCallback
- Returns:
- a new BasicBSONObject.
-
createList
protected BSONObject createList()
Deprecated.Description copied from class:BasicBSONCallback
Factory method for creating a new BSON List.- Overrides:
createList
in classBasicBSONCallback
- Returns:
- a new BasicBSONList.
-
arrayStart
public void arrayStart(String name)
Deprecated.Description copied from interface:BSONCallback
Signals the start of a BSON array, with its field name.- Specified by:
arrayStart
in interfaceBSONCallback
- Overrides:
arrayStart
in classBasicBSONCallback
- Parameters:
name
- the name of this array field
-
objectStart
public void objectStart(String name)
Deprecated.Description copied from interface:BSONCallback
Signals the start of a BSON document, which usually maps onto some Java object.- Specified by:
objectStart
in interfaceBSONCallback
- Overrides:
objectStart
in classBasicBSONCallback
- Parameters:
name
- the field name of the document.
-
objectDone
public Object objectDone()
Deprecated.Description copied from interface:BSONCallback
Called at the end of the document/array, and returns this object.- Specified by:
objectDone
in interfaceBSONCallback
- Overrides:
objectDone
in classBasicBSONCallback
- Returns:
- the Object that has been read from this section of the document.
-
-