|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectargo.jdom.JsonNodeFactories
public final class JsonNodeFactories
Factories for JsonNodes.
| Method Summary | |
|---|---|
static JsonRootNode |
array(java.lang.Iterable<? extends JsonNode> elements)
|
static JsonRootNode |
array(JsonNode... elements)
|
static JsonNode |
booleanNode(boolean value)
|
static JsonNode |
falseNode()
|
static JsonField |
field(JsonStringNode name,
JsonNode value)
|
static JsonField |
field(java.lang.String name,
JsonNode value)
|
static JsonRootNode |
lazyArray(java.util.List<? extends JsonNode> elements)
Generates an array where the members are only evaluated on request. |
static JsonRootNode |
lazyObject(java.util.List<JsonField> fields)
Generates an object where the members are only evaluated on request. |
static JsonNode |
nullNode()
|
static JsonNode |
number(java.math.BigDecimal value)
|
static JsonNode |
number(java.math.BigInteger value)
|
static JsonNode |
number(long value)
|
static JsonNode |
number(java.lang.String value)
|
static JsonRootNode |
object(java.lang.Iterable<JsonField> fields)
|
static JsonRootNode |
object(JsonField... fields)
|
static JsonRootNode |
object(java.util.Map<JsonStringNode,? extends JsonNode> fields)
|
static JsonStringNode |
string(java.lang.String value)
|
static JsonNode |
trueNode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static JsonNode nullNode()
public static JsonNode trueNode()
public static JsonNode falseNode()
public static JsonStringNode string(java.lang.String value)
value - the Java String to represent as a JSON string
public static JsonNode number(java.lang.String value)
value - a Java String to represent as a JSON number
public static JsonNode number(java.math.BigDecimal value)
value - a Java BigDecimal to represent as a JSON number
public static JsonNode number(java.math.BigInteger value)
value - a Java BigInteger to represent as a JSON number
public static JsonNode number(long value)
value - a Java long to represent as a JSON number
public static JsonRootNode array(java.lang.Iterable<? extends JsonNode> elements)
elements - JsonNodes that will populate the array
JsonNodespublic static JsonRootNode array(JsonNode... elements)
elements - JsonNodes that will populate the array
JsonNodespublic static JsonRootNode lazyArray(java.util.List<? extends JsonNode> elements)
List used in the
argument. If you supply a list of elements, and then add an item to the list, that item will also be
part of the array.
elements - JsonNodes that will populate the array
JsonNodespublic static JsonRootNode object(java.util.Map<JsonStringNode,? extends JsonNode> fields)
fields - JsonFields that the object will contain
public static JsonRootNode object(JsonField... fields)
fields - JsonFields that the object will contain
public static JsonRootNode object(java.lang.Iterable<JsonField> fields)
fields - JsonFields that the object will contain
public static JsonRootNode lazyObject(java.util.List<JsonField> fields)
List used in the
argument. If you supply a list of fields, and then add an item to the list, that item will also be
part of the object.
fields - JsonFields that the object will contain
public static JsonField field(java.lang.String name,
JsonNode value)
name - the name of the fieldvalue - the value of the field
public static JsonField field(JsonStringNode name,
JsonNode value)
name - the name of the fieldvalue - the value of the field
public static JsonNode booleanNode(boolean value)
value - the Java boolean to represent as a JSON Boolean
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||