P
- common parent for all nodes, required to allow mixed-type flexibilityO
- Object type, implements Map interfaceA
- Array type, implements List interfacepublic interface JSONFactory<P,O extends java.util.Map<java.lang.String,P>,A extends java.util.List<P>>
Modifier and Type | Method and Description |
---|---|
void |
addArrayElement(A array,
P elem)
Add an element to an array
|
void |
addObjectMember(O object,
java.lang.String key,
P val)
Add a member pair to an object
|
A |
createArray()
Preate a JSON array
|
P |
createFalse()
Preate a 'false' boolean element
|
P |
createNull()
Preate a 'null' element
|
P |
createNumber(double v)
Preate a number element
|
O |
createObject()
Preate a JSON Object
|
P |
createString(java.lang.String str)
Preate a String element
|
P |
createTrue()
Preate a 'true' boolean element
|
O createObject()
void addObjectMember(O object, java.lang.String key, P val)
A createArray()
P createString(java.lang.String str)
P createNumber(double v)
P createTrue()
P createFalse()
P createNull()