Package org.basex.io.parse.json
Class JsonXQueryConverter
java.lang.Object
org.basex.io.parse.json.JsonConverter
org.basex.io.parse.json.JsonXQueryConverter
Provides a method for parsing a JSON string and converting it to an XQuery
item made of nested maps. The mapping from JSON to XQuery is the following:
- string
- xs:string
- number
- xs:double
- boolean
- xs:boolean
- null
- an empty sequence
() - array (e.g.
["foo", true, 123]) - an XQuery map with integer keys, starting by 1 (e.g.
{1:'foo', 2:true(), 3:123}) - object (e.g.
{"foo": 42, "bar": null}) - an XQuery map (e.g.
{'foo':42, 'bar':()})
- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Method Summary
Methods inherited from class org.basex.io.parse.json.JsonConverter
convert, convert, fallback, get
-
Method Details
-
finish
-
numberLit
- Throws:
QueryIOException
-
stringLit
public void stringLit(byte[] value) -
nullLit
public void nullLit() -
booleanLit
public void booleanLit(byte[] value)
-