读书人

Json 处置

发布时间: 2012-08-27 21:21:57 作者: rapoo

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.





?

读书人网 >JavaScript

热点推荐