public class JSONNavi extends Object
| Constructor and Description |
|---|
JSONNavi() |
JSONNavi(ContainerFactory factory) |
JSONNavi(String json) |
| Modifier and Type | Method and Description |
|---|---|
JSONNavi |
add(Object... values) |
JSONNavi |
array()
Set current value as Json Array You can also skip this call Arrays can be
create automatically.
|
boolean |
asBoolean() |
Boolean |
asBooleanObj()
get the current object value as Boolean if the current Object is not a
Boolean return null.
|
double |
asDouble() |
Double |
asDoubleObj()
get the current object value as Double if the current Double can not be
cast as Integer return null.
|
double |
asFloat() |
Float |
asFloatObj()
get the current object value as Float if the current Float can not be
cast as Integer return null.
|
int |
asInt() |
Integer |
asIntegerObj()
get the current object value as Integer if the current Object can not be
cast as Integer return null.
|
long |
asLong() |
Long |
asLongObj()
get the current object value as Long if the current Object can not be
cast as Long return null.
|
String |
asString()
get the current object value as String if the current Object is null
return null.
|
JSONNavi |
at(int index)
Access to the index position.
|
JSONNavi |
at(String key) |
String |
getJPath() |
boolean |
hasFailure() |
JSONNavi |
object()
Set current value as Json Object You can also skip this call, Objects can
be create automatically.
|
JSONNavi |
root() |
JSONNavi |
set(Boolean bool)
set current value as Boolean
|
JSONNavi |
set(Number num)
set current value as Number
|
JSONNavi |
set(String text)
set current value as String
|
JSONNavi |
set(String key,
double value) |
JSONNavi |
set(String key,
float value) |
JSONNavi |
set(String key,
int value) |
JSONNavi |
set(String key,
long value) |
JSONNavi |
set(String key,
Number value) |
JSONNavi |
set(String key,
String value) |
String |
toString()
return the Object as a Json String
|
String |
toString(JSONStyle compression)
return the Object as a Json String
|
JSONNavi |
up()
Move one level up in Json tree.
|
JSONNavi |
up(int level)
call up() level times.
|
public JSONNavi()
public JSONNavi(String json)
public JSONNavi(ContainerFactory factory)
public JSONNavi root()
public boolean hasFailure()
public String asString()
public double asDouble()
public Double asDoubleObj()
public double asFloat()
public Float asFloatObj()
public int asInt()
public Integer asIntegerObj()
public long asLong()
public Long asLongObj()
public boolean asBoolean()
public Boolean asBooleanObj()
public JSONNavi object()
public JSONNavi array()
public JSONNavi at(int index)
index - desired position in Arraypublic JSONNavi up(int level)
level - number of parent move.public JSONNavi up()
public String toString()
public String toString(JSONStyle compression)
compression - public String getJPath()
Copyright © 2013 Chemouni Uriel. All Rights Reserved.