Class JsonXQueryConverter

java.lang.Object
org.basex.io.parse.json.JsonConverter
org.basex.io.parse.json.JsonXQueryConverter

public final class JsonXQueryConverter extends JsonConverter
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 Details

    • finish

      public Item finish()
    • numberLit

      public void numberLit(byte[] value) throws QueryIOException
      Throws:
      QueryIOException
    • stringLit

      public void stringLit(byte[] value)
    • nullLit

      public void nullLit()
    • booleanLit

      public void booleanLit(byte[] value)