|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minidev.json.JSONNavi
public class JSONNavi
A JQuery like Json editor, accessor.
Constructor Summary | |
---|---|
JSONNavi()
|
|
JSONNavi(ContainerFactory factory)
|
|
JSONNavi(String json)
|
Method Summary | |
---|---|
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)
|
JSONNavi |
atNext()
Access to last + 1 the index position. |
String |
getJPath()
|
boolean |
hasFailure()
|
static JSONNavi |
newInstance()
|
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. if no more level up is available the statement had no effect. |
JSONNavi |
up(int level)
call up() level times. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JSONNavi()
public JSONNavi(String json)
public JSONNavi(ContainerFactory factory)
Method Detail |
---|
public static JSONNavi newInstance()
public JSONNavi root()
public boolean hasFailure()
public JSONNavi at(String key)
public JSONNavi set(String key, String value)
public JSONNavi set(String key, Number value)
public JSONNavi set(String key, long value)
public JSONNavi set(String key, int value)
public JSONNavi set(String key, double value)
public JSONNavi set(String key, float value)
public JSONNavi add(Object... values)
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 set(Number num)
public JSONNavi set(Boolean bool)
public JSONNavi set(String text)
public JSONNavi at(int index)
index
- desired position in Arraypublic JSONNavi atNext()
public JSONNavi up(int level)
level
- number of parent move.public JSONNavi up()
public String toString()
toString
in class Object
public String toString(JSONStyle compression)
compression
- public String getJPath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |