Package sk.antons.json.parse.traversal
Interface JsonContentHandler
-
public interface JsonContentHandlerJson event consumer. It is used together with Traversal parser to generate events corresponding to json tree. Each method can throw StopTraverse exception to regularry stop processing.- Author:
- antons
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringcontextInfo()Help information for parser.voidendArray()End of the json array event.voidendDocument()End of the json document event.voidendObject()End of the json object event.voidliteral(JsonLiteralImpl literal)Json literal event.voidnameSeparator()Name separaton json event.voidstartArray()Start of the json array event.voidstartDocument()Start of the json document event.voidstartObject()Start of the json object event.voidvalueSeparator()Value separator json event.voidwhiteSpace(String content, int offset, int length)white space json event
-
-
-
Method Detail
-
contextInfo
String contextInfo()
Help information for parser. It is used in case of error.- Returns:
- information about state of parsing.
-
startDocument
void startDocument()
Start of the json document event.
-
endDocument
void endDocument()
End of the json document event.
-
startArray
void startArray()
Start of the json array event.
-
endArray
void endArray()
End of the json array event.
-
startObject
void startObject()
Start of the json object event.
-
endObject
void endObject()
End of the json object event.
-
valueSeparator
void valueSeparator()
Value separator json event.
-
nameSeparator
void nameSeparator()
Name separaton json event.
-
literal
void literal(JsonLiteralImpl literal)
Json literal event.- Parameters:
literal- provided literal
-
whiteSpace
void whiteSpace(String content, int offset, int length)
white space json event- Parameters:
content- String where whitespace is locatedoffset- start position of white space in contentlength- length of white space.
-
-