|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.query.util.json.JsonStringConverter
public final class JsonStringConverter
Writes the parsed JSON file to the given TokenBuilder
.
Method Summary | |
---|---|
void |
booleanLit(boolean b)
Called when a boolean literal is encountered. |
void |
closeArg()
Called when an argument of a constructor function is closed. |
void |
closeArray()
Called when a JSON array is closed. |
void |
closeArrayEntry()
Called when an entry of a JSON array is closed. |
void |
closeConstr()
Called when a constructor function is closed. |
void |
closeEntry()
Called when an entry of a JSON object is closed. |
void |
closeObject()
Called when a JSON object is closed. |
void |
nullLit()
Called when a null literal is encountered. |
void |
numberLit(byte[] value)
Called when a number literal is encountered. |
void |
openArg()
Called when an argument of a constructor function is opened. |
void |
openArray()
Called when a JSON array is opened. |
void |
openArrayEntry()
Called when an entry of a JSON array is opened. |
void |
openConstr(byte[] name)
Called when a constructor function is opened. |
void |
openEntry(byte[] key)
Called when an entry of a JSON object is opened. |
void |
openObject()
Called when a JSON object is opened. |
static TokenBuilder |
print(java.lang.String json,
JsonParser.Spec spec,
boolean un,
TokenBuilder tb)
Writes a pretty-printed representation of the given JSON string to the given builder. |
void |
stringLit(byte[] value)
Called when a string literal is encountered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static TokenBuilder print(java.lang.String json, JsonParser.Spec spec, boolean un, TokenBuilder tb) throws QueryException
json
- JSON stringspec
- JSON spec for parsingun
- unescape flagtb
- token builder
QueryException
- parse exceptionpublic void openObject() throws QueryException
JsonHandler
openObject
in interface JsonHandler
QueryException
- query exceptionpublic void openEntry(byte[] key) throws QueryException
JsonHandler
openEntry
in interface JsonHandler
key
- the key of the entry
QueryException
- query exceptionpublic void closeEntry() throws QueryException
JsonHandler
closeEntry
in interface JsonHandler
QueryException
- query exceptionpublic void closeObject() throws QueryException
JsonHandler
closeObject
in interface JsonHandler
QueryException
- query exceptionpublic void openArray() throws QueryException
JsonHandler
openArray
in interface JsonHandler
QueryException
- query exceptionpublic void openArrayEntry() throws QueryException
JsonHandler
openArrayEntry
in interface JsonHandler
QueryException
- query exceptionpublic void closeArrayEntry() throws QueryException
JsonHandler
closeArrayEntry
in interface JsonHandler
QueryException
- query exceptionpublic void closeArray() throws QueryException
JsonHandler
closeArray
in interface JsonHandler
QueryException
- query exceptionpublic void openConstr(byte[] name) throws QueryException
JsonHandler
openConstr
in interface JsonHandler
name
- name of the constructor
QueryException
- query exceptionpublic void openArg() throws QueryException
JsonHandler
openArg
in interface JsonHandler
QueryException
- query exceptionpublic void closeArg() throws QueryException
JsonHandler
closeArg
in interface JsonHandler
QueryException
- query exceptionpublic void closeConstr() throws QueryException
JsonHandler
closeConstr
in interface JsonHandler
QueryException
- query exceptionpublic void numberLit(byte[] value) throws QueryException
JsonHandler
numberLit
in interface JsonHandler
value
- string representation of the number literal
QueryException
- query exceptionpublic void stringLit(byte[] value)
JsonHandler
stringLit
in interface JsonHandler
value
- the stringpublic void nullLit() throws QueryException
JsonHandler
null
literal is encountered.
nullLit
in interface JsonHandler
QueryException
- query exceptionpublic void booleanLit(boolean b) throws QueryException
JsonHandler
booleanLit
in interface JsonHandler
b
- the boolean
QueryException
- query exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |