日期:2014-05-16  浏览次数:20335 次

Json 处理

optInt
public int optInt
(java.lang.String?key)
Get an optional int value associated with a key,
or zero if there is no such key or if the value is not a number.
If the value is a string, an attempt will be made to evaluate it as
a number.

Parameters:
key - A key string.

Returns:
An object which is the value.

==================================================

optDouble
public double optDouble
(java.lang.String?key)
Get an optional double associated with a key,
or NaN if there is no such key or if its value is not a number .
If the value is a string, an attempt will be made to evaluate it as
a number.

Parameters:
key - A string which is the key.

Returns:
An object which is the value.





?