Package org.grails.datastore.bson.json
Class JsonReader
- java.lang.Object
-
- org.bson.AbstractBsonReader
-
- org.grails.datastore.bson.json.JsonReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.bson.BsonReader
public class JsonReader extends org.bson.AbstractBsonReaderA simplified fork ofJsonReaderthat works with readers and removes processing related to MongoDB- Since:
- 6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classJsonReader.Contextprotected classJsonReader.Mark
-
Constructor Summary
Constructors Constructor Description JsonReader(java.io.Reader reader)Constructs a new instance with the given JSON reader.JsonReader(java.lang.String json)Constructs a new instance with the given JSON string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdoPeekBinarySize()protected bytedoPeekBinarySubType()protected org.bson.BsonBinarydoReadBinaryData()protected booleandoReadBoolean()protected longdoReadDateTime()protected org.bson.BsonDbPointerdoReadDBPointer()protected org.bson.types.Decimal128doReadDecimal128()protected doubledoReadDouble()protected voiddoReadEndArray()protected voiddoReadEndDocument()protected intdoReadInt32()protected longdoReadInt64()protected java.lang.StringdoReadJavaScript()protected java.lang.StringdoReadJavaScriptWithScope()protected voiddoReadMaxKey()protected voiddoReadMinKey()protected voiddoReadNull()protected org.bson.types.ObjectIddoReadObjectId()protected org.bson.BsonRegularExpressiondoReadRegularExpression()protected voiddoReadStartArray()protected voiddoReadStartDocument()protected java.lang.StringdoReadString()protected java.lang.StringdoReadSymbol()protected org.bson.BsonTimestampdoReadTimestamp()protected voiddoReadUndefined()protected voiddoSkipName()protected voiddoSkipValue()protected JsonReader.ContextgetContext()org.bson.BsonReaderMarkgetMark()org.bson.BsonTypereadBsonType()-
Methods inherited from class org.bson.AbstractBsonReader
checkPreconditions, close, getCurrentBsonType, getCurrentName, getNextState, getState, isClosed, peekBinarySize, peekBinarySubType, readBinaryData, readBinaryData, readBoolean, readBoolean, readDateTime, readDateTime, readDBPointer, readDBPointer, readDecimal128, readDecimal128, readDouble, readDouble, readEndArray, readEndDocument, readInt32, readInt32, readInt64, readInt64, readJavaScript, readJavaScript, readJavaScriptWithScope, readJavaScriptWithScope, readMaxKey, readMaxKey, readMinKey, readMinKey, readName, readName, readNull, readNull, readObjectId, readObjectId, readRegularExpression, readRegularExpression, readStartArray, readStartDocument, readString, readString, readSymbol, readSymbol, readTimestamp, readTimestamp, readUndefined, readUndefined, setContext, setCurrentBsonType, setCurrentName, setState, skipName, skipValue, throwInvalidContextType, throwInvalidState, verifyBSONType, verifyName
-
-
-
-
Constructor Detail
-
JsonReader
public JsonReader(java.lang.String json)
Constructs a new instance with the given JSON string.- Parameters:
json- A string representation of a JSON.
-
JsonReader
public JsonReader(java.io.Reader reader)
Constructs a new instance with the given JSON reader.- Parameters:
reader- The reader.
-
-
Method Detail
-
doReadBinaryData
protected org.bson.BsonBinary doReadBinaryData()
- Specified by:
doReadBinaryDatain classorg.bson.AbstractBsonReader
-
doPeekBinarySubType
protected byte doPeekBinarySubType()
- Specified by:
doPeekBinarySubTypein classorg.bson.AbstractBsonReader
-
doPeekBinarySize
protected int doPeekBinarySize()
- Specified by:
doPeekBinarySizein classorg.bson.AbstractBsonReader
-
doReadBoolean
protected boolean doReadBoolean()
- Specified by:
doReadBooleanin classorg.bson.AbstractBsonReader
-
readBsonType
public org.bson.BsonType readBsonType()
- Specified by:
readBsonTypein interfaceorg.bson.BsonReader- Specified by:
readBsonTypein classorg.bson.AbstractBsonReader
-
doReadDateTime
protected long doReadDateTime()
- Specified by:
doReadDateTimein classorg.bson.AbstractBsonReader
-
doReadDouble
protected double doReadDouble()
- Specified by:
doReadDoublein classorg.bson.AbstractBsonReader
-
doReadEndArray
protected void doReadEndArray()
- Specified by:
doReadEndArrayin classorg.bson.AbstractBsonReader
-
doReadEndDocument
protected void doReadEndDocument()
- Specified by:
doReadEndDocumentin classorg.bson.AbstractBsonReader
-
doReadInt32
protected int doReadInt32()
- Specified by:
doReadInt32in classorg.bson.AbstractBsonReader
-
doReadInt64
protected long doReadInt64()
- Specified by:
doReadInt64in classorg.bson.AbstractBsonReader
-
doReadDecimal128
protected org.bson.types.Decimal128 doReadDecimal128()
- Specified by:
doReadDecimal128in classorg.bson.AbstractBsonReader
-
doReadJavaScript
protected java.lang.String doReadJavaScript()
- Specified by:
doReadJavaScriptin classorg.bson.AbstractBsonReader
-
doReadJavaScriptWithScope
protected java.lang.String doReadJavaScriptWithScope()
- Specified by:
doReadJavaScriptWithScopein classorg.bson.AbstractBsonReader
-
doReadMaxKey
protected void doReadMaxKey()
- Specified by:
doReadMaxKeyin classorg.bson.AbstractBsonReader
-
doReadMinKey
protected void doReadMinKey()
- Specified by:
doReadMinKeyin classorg.bson.AbstractBsonReader
-
doReadNull
protected void doReadNull()
- Specified by:
doReadNullin classorg.bson.AbstractBsonReader
-
doReadObjectId
protected org.bson.types.ObjectId doReadObjectId()
- Specified by:
doReadObjectIdin classorg.bson.AbstractBsonReader
-
doReadRegularExpression
protected org.bson.BsonRegularExpression doReadRegularExpression()
- Specified by:
doReadRegularExpressionin classorg.bson.AbstractBsonReader
-
doReadDBPointer
protected org.bson.BsonDbPointer doReadDBPointer()
- Specified by:
doReadDBPointerin classorg.bson.AbstractBsonReader
-
doReadStartArray
protected void doReadStartArray()
- Specified by:
doReadStartArrayin classorg.bson.AbstractBsonReader
-
doReadStartDocument
protected void doReadStartDocument()
- Specified by:
doReadStartDocumentin classorg.bson.AbstractBsonReader
-
doReadString
protected java.lang.String doReadString()
- Specified by:
doReadStringin classorg.bson.AbstractBsonReader
-
doReadSymbol
protected java.lang.String doReadSymbol()
- Specified by:
doReadSymbolin classorg.bson.AbstractBsonReader
-
doReadTimestamp
protected org.bson.BsonTimestamp doReadTimestamp()
- Specified by:
doReadTimestampin classorg.bson.AbstractBsonReader
-
doReadUndefined
protected void doReadUndefined()
- Specified by:
doReadUndefinedin classorg.bson.AbstractBsonReader
-
doSkipName
protected void doSkipName()
- Specified by:
doSkipNamein classorg.bson.AbstractBsonReader
-
doSkipValue
protected void doSkipValue()
- Specified by:
doSkipValuein classorg.bson.AbstractBsonReader
-
getMark
public org.bson.BsonReaderMark getMark()
-
getContext
protected JsonReader.Context getContext()
- Overrides:
getContextin classorg.bson.AbstractBsonReader
-
-