public class EmbedJsonUtils
extends java.lang.Object
构造器和说明 |
---|
EmbedJsonUtils() |
限定符和类型 | 方法和说明 |
---|---|
static java.lang.String |
date2String(java.util.Date date) |
static java.lang.String |
doubleToString(double d)
Produce a string from a double.
|
static java.lang.String |
from(java.util.Date date) |
static java.lang.String[] |
getNames(JSONObject jo)
Get an array of field names from a JSONObject.
|
static java.lang.Object |
getValue(java.lang.Object val)
嵌套获取JSON中的值
|
static <K,V> V |
merge(java.util.Map<K,V> map,
K key,
V value,
Function<? super V,? super V,? extends V> remappingFunction) |
static java.lang.String |
numberToString(java.lang.Number n)
Produce a string from a Number.
|
static java.lang.String |
quote(java.lang.String string)
Produce a string in double quotes with backslash sequences in all the
right places.
|
static void |
testValidity(java.lang.Object o)
判断一个对象是否为无穷大或者不是数字
|
static java.util.Date |
to(java.lang.String text) |
public static <K,V> V merge(java.util.Map<K,V> map, K key, V value, Function<? super V,? super V,? extends V> remappingFunction)
public static java.lang.String from(java.util.Date date)
public static java.util.Date to(java.lang.String text)
public static java.lang.String numberToString(java.lang.Number n) throws JSONException
n
- A NumberJSONException
- If n is a non-finite number.public static java.lang.String doubleToString(double d)
d
- A double.public static java.lang.String[] getNames(JSONObject jo)
public static java.lang.String date2String(java.util.Date date) throws JSONException
JSONException
public static void testValidity(java.lang.Object o) throws JSONException
o
- 对象JSONException
- 如果是无穷大或者不是数字,则抛出此异常public static java.lang.String quote(java.lang.String string)
string
- A Stringpublic static java.lang.Object getValue(java.lang.Object val)