public class MinXMLBuilderJSONBuilder extends JSONBuildCounter implements JSONBuilder<MinXML>
| Modifier and Type | Field and Description |
|---|---|
protected MinXMLBuilder |
builder |
protected java.lang.String |
field_name |
protected JSONKeywords |
keywords |
| Constructor and Description |
|---|
MinXMLBuilderJSONBuilder()
A convenience constructor that specialises the translation table to a
standard set of keywords and the MinXML builder to a FlexiMinXML builder.
|
MinXMLBuilderJSONBuilder(MinXMLBuilder builder)
A convenience constructor that specialises the translation table to a
standard set of keywords.
|
MinXMLBuilderJSONBuilder(MinXMLBuilder builder,
JSONKeywords keys)
Creates a JSONBuilder from a MinXML builder and a translation
table.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBoolean(boolean value)
This method should be invoked when the parser consumes a
JSON expression 'true' or 'false'.
|
void |
addFloat(double value)
This method should be invoked when the parser consumes a
JSON floating point value.
|
void |
addInteger(java.math.BigInteger value)
This method should preferably be invoked when the parser consumes
a JSON integer value that is too large to fit in a long.
|
void |
addInteger(long value)
This method should be invoked when the parser consumes a
JSON integer value.
|
void |
addNull()
This method should be invoked when the parser consumes a
JSON expression 'null'.
|
void |
addString(java.lang.String value)
This method should be invoked when the parser consumes a
JSON string.
|
MinXML |
build()
This method will return a value representing the JSON tree
consumed so far by the parser.
|
void |
endArray()
This method should be invoked when the parser consumes the
end of an array i.e.
|
void |
endObject()
This method should be invoked when the parser consumes the
end of an object i.e.
|
void |
field(java.lang.String field)
This method should be invoked when the parser consumes the
field name of an object ahead of a ':'.
|
void |
startArray()
This method should be invoked when the parser consumes the
start of an array i.e.
|
void |
startObject()
This method should be invoked when the parser consumes the
start of an object i.e.
|
buildCheck, decrement, incrementprotected MinXMLBuilder builder
protected java.lang.String field_name
protected final JSONKeywords keywords
public MinXMLBuilderJSONBuilder()
public MinXMLBuilderJSONBuilder(MinXMLBuilder builder)
builder - the MinXML builder used to construct the internal treepublic MinXMLBuilderJSONBuilder(MinXMLBuilder builder, JSONKeywords keys)
builder - the MinXML builder used to construct the internal treekeys - the set of strings to embed in the final MinXMLpublic void addNull()
JSONBuilderaddNull in interface JSONBuilder<MinXML>public void addBoolean(boolean value)
JSONBuilderaddBoolean in interface JSONBuilder<MinXML>value - true if the expression was 'true', else false.public void addInteger(long value)
JSONBuilderaddInteger in interface JSONBuilder<MinXML>value - the integer value as a signed 64-bit integer.public void addInteger(java.math.BigInteger value)
JSONBuilderaddInteger in interface JSONBuilder<MinXML>value - the value as a big-integerpublic void addFloat(double value)
JSONBuilderaddFloat in interface JSONBuilder<MinXML>value - the floating point valuepublic void addString(java.lang.String value)
JSONBuilderaddString in interface JSONBuilder<MinXML>value - the stringpublic void startArray()
JSONBuilderstartArray in interface JSONBuilder<MinXML>public void endArray()
JSONBuilderendArray in interface JSONBuilder<MinXML>public void field(java.lang.String field)
JSONBuilderfield in interface JSONBuilder<MinXML>field - name of the fieldpublic void startObject()
JSONBuilderstartObject in interface JSONBuilder<MinXML>public void endObject()
JSONBuilderendObject in interface JSONBuilder<MinXML>public MinXML build()
JSONBuilderJSONBuildFailedException.build in interface JSONBuilder<MinXML>