org.basex.query.util.json
Interface JsonHandler

All Known Implementing Classes:
JsonMapConverter, JsonStringConverter

public interface JsonHandler

A handler for events from a JsonParser.

Author:
BaseX Team 2005-12, BSD License, Leo Woerteler

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.
 void stringLit(byte[] bs)
          Called when a string literal is encountered.
 

Method Detail

openObject

void openObject()
                throws QueryException
Called when a JSON object is opened.

Throws:
QueryException - query exception

openEntry

void openEntry(byte[] key)
               throws QueryException
Called when an entry of a JSON object is opened.

Parameters:
key - the key of the entry
Throws:
QueryException - query exception

closeEntry

void closeEntry()
                throws QueryException
Called when an entry of a JSON object is closed.

Throws:
QueryException - query exception

closeObject

void closeObject()
                 throws QueryException
Called when a JSON object is closed.

Throws:
QueryException - query exception

openArray

void openArray()
               throws QueryException
Called when a JSON array is opened.

Throws:
QueryException - query exception

openArrayEntry

void openArrayEntry()
                    throws QueryException
Called when an entry of a JSON array is opened.

Throws:
QueryException - query exception

closeArrayEntry

void closeArrayEntry()
                     throws QueryException
Called when an entry of a JSON array is closed.

Throws:
QueryException - query exception

closeArray

void closeArray()
                throws QueryException
Called when a JSON array is closed.

Throws:
QueryException - query exception

openConstr

void openConstr(byte[] name)
                throws QueryException
Called when a constructor function is opened.

Parameters:
name - name of the constructor
Throws:
QueryException - query exception

openArg

void openArg()
             throws QueryException
Called when an argument of a constructor function is opened.

Throws:
QueryException - query exception

closeArg

void closeArg()
              throws QueryException
Called when an argument of a constructor function is closed.

Throws:
QueryException - query exception

closeConstr

void closeConstr()
                 throws QueryException
Called when a constructor function is closed.

Throws:
QueryException - query exception

numberLit

void numberLit(byte[] value)
               throws QueryException
Called when a number literal is encountered.

Parameters:
value - string representation of the number literal
Throws:
QueryException - query exception

stringLit

void stringLit(byte[] bs)
               throws QueryException
Called when a string literal is encountered.

Parameters:
bs - the string
Throws:
QueryException - query exception

nullLit

void nullLit()
             throws QueryException
Called when a null literal is encountered.

Throws:
QueryException - query exception

booleanLit

void booleanLit(boolean b)
                throws QueryException
Called when a boolean literal is encountered.

Parameters:
b - the boolean
Throws:
QueryException - query exception