public class JFinalJson extends Json
Modifier and Type | Field and Description |
---|---|
protected int |
convertDepth |
protected String |
timestampPattern |
datePattern
Constructor and Description |
---|
JFinalJson() |
Modifier and Type | Method and Description |
---|---|
protected String |
beanToJson(Object model,
int depth) |
protected String |
escape(String s)
Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F).
|
protected void |
escape(String s,
StringBuilder sb) |
static JFinalJson |
getJson() |
protected String |
iteratorToJson(Iterator iter,
int depth) |
protected String |
mapToJson(Map map,
int depth) |
protected String |
otherToJson(Object value,
int depth) |
<T> T |
parse(String jsonString,
Class<T> type) |
JFinalJson |
setConvertDepth(int convertDepth) |
Json |
setDatePattern(String datePattern) |
static void |
setDefaultConvertDepth(int defaultConvertDepth)
设置全局性默认转换深度
|
JFinalJson |
setTimestampPattern(String timestampPattern) |
String |
toJson(Object object) |
protected String |
toJson(Object value,
int depth) |
protected void |
toKeyValue(String key,
Object value,
StringBuilder sb,
int depth) |
getDatePattern, getDefaultDatePattern
protected int convertDepth
protected String timestampPattern
public static void setDefaultConvertDepth(int defaultConvertDepth)
public JFinalJson setConvertDepth(int convertDepth)
public JFinalJson setTimestampPattern(String timestampPattern)
public Json setDatePattern(String datePattern)
setDatePattern
in class Json
public static JFinalJson getJson()
protected void toKeyValue(String key, Object value, StringBuilder sb, int depth)
protected String escape(String s)
protected void escape(String s, StringBuilder sb)
Copyright © 2018. All rights reserved.