跳过导航链接
A B C D E F G H I J L M N O P Q R S T W X 

A

accumulate(String, Object) - 类 中的方法cn.hutool.json.JSONObject
积累值。
add(Object) - 类 中的方法cn.hutool.json.JSONArray
 
add(int, Object) - 类 中的方法cn.hutool.json.JSONArray
 
addAll(Collection<?>) - 类 中的方法cn.hutool.json.JSONArray
 
addAll(int, Collection<?>) - 类 中的方法cn.hutool.json.JSONArray
 
addRaw(Object, Filter<Mutable<Object>>) - 类 中的方法cn.hutool.json.JSONArray
原始添加,添加的对象不做任何处理
AMP - 类 中的静态变量cn.hutool.json.XML
The Character '&'.
APOS - 类 中的静态变量cn.hutool.json.XML
The Character '''.
append(String, Object) - 类 中的方法cn.hutool.json.JSONObject
追加值,如果key无对应值,就添加一个JSONArray,其元素只有value,如果值已经是一个JSONArray,则添加到值JSONArray中。

B

back() - 类 中的方法cn.hutool.json.JSONTokener
将标记回退到第一个字符,重新开始解析新的JSON
BANG - 类 中的静态变量cn.hutool.json.XML
The Character '!'.
beginArray() - 类 中的方法cn.hutool.json.serialize.JSONWriter
JSONArray写出开始,默认写出"["
beginObj() - 类 中的方法cn.hutool.json.serialize.JSONWriter
JSONObject写出开始,默认写出"{"

C

clear() - 类 中的方法cn.hutool.json.JSONArray
 
clone() - 类 中的方法cn.hutool.json.JSONArray
 
clone() - 类 中的方法cn.hutool.json.JSONObject
 
close() - 类 中的方法cn.hutool.json.serialize.JSONWriter
 
cn.hutool.json - 程序包 cn.hutool.json
JSON封装,基于json.org官方库改造
cn.hutool.json.serialize - 程序包 cn.hutool.json.serialize
JSON自定义序列化和反序列化接口和默认实现
cn.hutool.json.xml - 程序包 cn.hutool.json.xml
JSON与XML相互转换封装,基于json.org官方库改造
contains(Object) - 类 中的方法cn.hutool.json.JSONArray
 
containsAll(Collection<?>) - 类 中的方法cn.hutool.json.JSONArray
 
convert(Object, JSON) - 类 中的方法cn.hutool.json.JSONConverter
 
create() - 类 中的静态方法cn.hutool.json.JSONConfig
创建默认的配置项
createArray() - 类 中的静态方法cn.hutool.json.JSONUtil
创建 JSONArray
createArray(JSONConfig) - 类 中的静态方法cn.hutool.json.JSONUtil
创建 JSONArray
createObj() - 类 中的静态方法cn.hutool.json.JSONUtil
创建JSONObject
createObj(JSONConfig) - 类 中的静态方法cn.hutool.json.JSONUtil
创建JSONObject

D

DEFAULT_CAPACITY - 类 中的静态变量cn.hutool.json.JSONArray
默认初始大小
DEFAULT_CAPACITY - 类 中的静态变量cn.hutool.json.JSONObject
默认初始大小
deserialize(JSON) - 接口 中的方法cn.hutool.json.serialize.JSONDeserializer
反序列化,通过实现此方法,自定义实现JSON转换为指定类型的逻辑
deserialize(JSON) - 类 中的方法cn.hutool.json.serialize.TemporalAccessorSerializer
 

E

end() - 类 中的方法cn.hutool.json.JSONTokener
 
end() - 类 中的方法cn.hutool.json.serialize.JSONWriter
结束,默认根据开始的类型,补充"}"或"]"
entity - 类 中的静态变量cn.hutool.json.XMLTokener
The table of entity values.
EQ - 类 中的静态变量cn.hutool.json.XML
The Character '='.
equals(Object) - 类 中的方法cn.hutool.json.JSONArray
 
equals(Object) - 类 中的方法cn.hutool.json.JSONNull
A Null object is equal to the null value and to itself.
escape(String) - 类 中的静态方法cn.hutool.json.JSONUtil
转义显示不可见字符

F

flush() - 类 中的方法cn.hutool.json.serialize.JSONWriter
 
format(String) - 类 中的静态方法cn.hutool.json.JSONStrFormatter
返回格式化JSON字符串。
formatJsonStr(String) - 类 中的静态方法cn.hutool.json.JSONUtil
格式化JSON字符串,此方法并不严格检查JSON的格式正确与否

G

get(int) - 类 中的方法cn.hutool.json.JSONArray
 
get(K, Class<T>) - 接口 中的方法cn.hutool.json.JSONGetter
获取指定类型的对象
转换失败或抛出异常
get(K, Class<T>, boolean) - 接口 中的方法cn.hutool.json.JSONGetter
获取指定类型的对象
getBean(K, Class<T>) - 接口 中的方法cn.hutool.json.JSONGetter
从JSON中直接获取Bean对象
先获取JSONObject对象,然后转为Bean对象
getBeanList(K, Class<T>) - 接口 中的方法cn.hutool.json.JSONGetter
从JSON中直接获取Bean的List列表
先获取JSONArray对象,然后转为Bean的List
getByPath(String) - 接口 中的方法cn.hutool.json.JSON
通过表达式获取JSON中嵌套的对象
.表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值 []表达式,可以获取集合等对象中对应index的值 表达式栗子: persion persion.name persons[3] person.friends[5].name
getByPath(String, Class<T>) - 接口 中的方法cn.hutool.json.JSON
通过表达式获取JSON中嵌套的对象
.表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值 []表达式,可以获取集合等对象中对应index的值 表达式栗子: persion persion.name persons[3] person.friends[5].name 获取表达式对应值后转换为对应类型的值
getByPath(String) - 类 中的方法cn.hutool.json.JSONArray
 
getByPath(String, Class<T>) - 类 中的方法cn.hutool.json.JSONArray
 
getByPath(String) - 类 中的方法cn.hutool.json.JSONObject
 
getByPath(String, Class<T>) - 类 中的方法cn.hutool.json.JSONObject
 
getByPath(JSON, String) - 类 中的静态方法cn.hutool.json.JSONUtil
通过表达式获取JSON中嵌套的对象
.表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值 []表达式,可以获取集合等对象中对应index的值 表达式栗子: persion persion.name persons[3] person.friends[5].name
getByPath(JSON, String, T) - 类 中的静态方法cn.hutool.json.JSONUtil
通过表达式获取JSON中嵌套的对象
.表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值 []表达式,可以获取集合等对象中对应index的值 表达式栗子: persion persion.name persons[3] person.friends[5].name
getBytes(K) - 接口 中的方法cn.hutool.json.JSONGetter
获取byte[]数据
getConfig() - 类 中的方法cn.hutool.json.JSONArray
 
getConfig() - 接口 中的方法cn.hutool.json.JSONGetter
获取JSON配置
getConfig() - 类 中的方法cn.hutool.json.JSONObject
 
getDate(K, Date) - 接口 中的方法cn.hutool.json.JSONGetter
 
getDateFormat() - 类 中的方法cn.hutool.json.JSONConfig
日期格式,null表示默认的时间戳
getDeserializer(Type) - 类 中的静态方法cn.hutool.json.serialize.GlobalSerializeMapping
获取自定义的反序列化器,如果未定义返回null
getJSONArray(K) - 接口 中的方法cn.hutool.json.JSONGetter
获得JSONArray对象
如果值为其它类型对象,尝试转换为JSONArray返回,否则抛出异常
getJSONObject(K) - 接口 中的方法cn.hutool.json.JSONGetter
获得JSONObject对象
如果值为其它类型对象,尝试转换为JSONObject返回,否则抛出异常
getKeyComparator() - 类 中的方法cn.hutool.json.JSONConfig
获取键排序规则
键排序规则,null表示不排序,不排序情况下,按照加入顺序排序
getLocalDateTime(K, LocalDateTime) - 接口 中的方法cn.hutool.json.JSONGetter
获取LocalDateTime类型值
getObj(Integer, Object) - 类 中的方法cn.hutool.json.JSONArray
 
getObj(String, Object) - 类 中的方法cn.hutool.json.JSONObject
 
getSerializer(Type) - 类 中的静态方法cn.hutool.json.serialize.GlobalSerializeMapping
获取自定义的序列化器,如果未定义返回null
getStrEscaped(K) - 接口 中的方法cn.hutool.json.JSONGetter
获取字符串类型值,并转义不可见字符,如'\n'换行符会被转义为字符串"\n"
getStrEscaped(K, String) - 接口 中的方法cn.hutool.json.JSONGetter
获取字符串类型值,并转义不可见字符,如'\n'换行符会被转义为字符串"\n"
GlobalSerializeMapping - cn.hutool.json.serialize中的类
全局的序列化和反序列化器映射
在JSON和Java对象转换过程中,优先使用注册于此处的自定义转换
GlobalSerializeMapping() - 类 的构造器cn.hutool.json.serialize.GlobalSerializeMapping
 
GT - 类 中的静态变量cn.hutool.json.XML
The Character '>'.

H

hashCode() - 类 中的方法cn.hutool.json.JSONArray
 

I

increment(String) - 类 中的方法cn.hutool.json.JSONObject
对值加一,如果值不存在,赋值1,如果为数字类型,做加一操作
indexOf(Object) - 类 中的方法cn.hutool.json.JSONArray
 
InternalJSONUtil - cn.hutool.json中的类
内部JSON工具类,仅用于JSON内部使用
isEmpty() - 类 中的方法cn.hutool.json.JSONArray
 
isIgnoreCase() - 类 中的方法cn.hutool.json.JSONConfig
是否忽略键的大小写
isIgnoreError() - 类 中的方法cn.hutool.json.JSONConfig
是否忽略转换过程中的异常
isIgnoreNullValue() - 类 中的方法cn.hutool.json.JSONConfig
是否忽略null值
isJson(String) - 类 中的静态方法cn.hutool.json.JSONUtil
已过时。
方法名称有歧义,请使用 JSONUtil.isTypeJSON(String)
isJsonArray(String) - 类 中的静态方法cn.hutool.json.JSONUtil
已过时。
方法名称有歧义,请使用 JSONUtil.isTypeJSONArray(String)
isJsonObj(String) - 类 中的静态方法cn.hutool.json.JSONUtil
已过时。
方法名称有歧义,请使用 JSONUtil.isTypeJSONObject(String)
isNull(K) - 接口 中的方法cn.hutool.json.JSONGetter
key对应值是否为null或无此key
isNull(Object) - 类 中的静态方法cn.hutool.json.JSONUtil
是否为null对象,null的情况包括: 1.
isOrder() - 类 中的方法cn.hutool.json.JSONConfig
已过时。
始终返回 true
isStripTrailingZeros() - 类 中的方法cn.hutool.json.JSONConfig
是否去除末尾多余0,例如如果为true,5.0返回5
isTransientSupport() - 类 中的方法cn.hutool.json.JSONConfig
是否支持transient关键字修饰和@Transient注解,如果支持,被修饰的字段或方法对应的字段将被忽略。
isTypeJSON(String) - 类 中的静态方法cn.hutool.json.JSONUtil
是否为JSON类型字符串,首尾都为大括号或中括号判定为JSON字符串
isTypeJSONArray(String) - 类 中的静态方法cn.hutool.json.JSONUtil
是否为JSONArray类型的字符串,首尾都为中括号判定为JSONArray字符串
isTypeJSONObject(String) - 类 中的静态方法cn.hutool.json.JSONUtil
是否为JSONObject类型字符串,首尾都为大括号判定为JSONObject字符串
iterator() - 类 中的方法cn.hutool.json.JSONArray
 
iterator() - 类 中的方法cn.hutool.json.JSONObjectIter
 

J

join(String) - 类 中的方法cn.hutool.json.JSONArray
JSONArray转为以separator为分界符的字符串
JSON - cn.hutool.json中的接口
JSON接口
JSONArray - cn.hutool.json中的类
JSON数组
JSON数组是表示中括号括住的数据表现形式
对应的JSON字符串格格式例如: ["a", "b", "c", 12]
JSONArray() - 类 的构造器cn.hutool.json.JSONArray
构造
默认使用ArrayList 实现
JSONArray(int) - 类 的构造器cn.hutool.json.JSONArray
构造
默认使用ArrayList 实现
JSONArray(JSONConfig) - 类 的构造器cn.hutool.json.JSONArray
构造
默认使用ArrayList 实现
JSONArray(int, JSONConfig) - 类 的构造器cn.hutool.json.JSONArray
构造
默认使用ArrayList 实现
JSONArray(Object) - 类 的构造器cn.hutool.json.JSONArray
从对象构造,忽略null的值
支持以下类型的参数: 1.
JSONArray(Object, boolean) - 类 的构造器cn.hutool.json.JSONArray
从对象构造
支持以下类型的参数: 1.
JSONArray(Object, JSONConfig) - 类 的构造器cn.hutool.json.JSONArray
从对象构造
支持以下类型的参数: 1.
JSONArray(Object, JSONConfig, Filter<Mutable<Object>>) - 类 的构造器cn.hutool.json.JSONArray
从对象构造
支持以下类型的参数: 1.
JSONArraySerializer<V> - cn.hutool.json.serialize中的接口
JSON列表的序列化接口,用于将特定对象序列化为JSONArray
JSONBeanParser<T> - cn.hutool.json中的接口
实现此接口的类可以通过实现parse(value)方法来将JSON中的值解析为此对象的值
JSONConfig - cn.hutool.json中的类
JSON配置项
JSONConfig() - 类 的构造器cn.hutool.json.JSONConfig
 
jsonConvert(Type, Object, boolean) - 类 中的静态方法cn.hutool.json.JSONConverter
JSON递归转换
首先尝试JDK类型转换,如果失败尝试JSON转Bean
如果遇到JSONBeanParser,则调用其JSONBeanParser.parse(Object)方法转换。
JSONConverter - cn.hutool.json中的类
JSON转换器
JSONConverter() - 类 的构造器cn.hutool.json.JSONConverter
 
JSONDeserializer<T> - cn.hutool.json.serialize中的接口
JSON反序列话自定义实现类
JSONException - cn.hutool.json中的异常错误
JSON异常
JSONException(Throwable) - 异常错误 的构造器cn.hutool.json.JSONException
 
JSONException(String) - 异常错误 的构造器cn.hutool.json.JSONException
 
JSONException(String, Object...) - 异常错误 的构造器cn.hutool.json.JSONException
 
JSONException(String, Throwable) - 异常错误 的构造器cn.hutool.json.JSONException
 
JSONException(String, Throwable, boolean, boolean) - 异常错误 的构造器cn.hutool.json.JSONException
 
JSONException(Throwable, String, Object...) - 异常错误 的构造器cn.hutool.json.JSONException
 
JSONGetter<K> - cn.hutool.json中的接口
用于JSON的Getter类,提供各种类型的Getter方法
jsonIter() - 类 中的方法cn.hutool.json.JSONArray
当此JSON列表的每个元素都是一个JSONObject时,可以调用此方法返回一个Iterable,便于使用foreach语法遍历
JSONNull - cn.hutool.json中的类
用于定义null,与Javascript中null相对应
Java中的null值在js中表示为undefined。
JSONNull() - 类 的构造器cn.hutool.json.JSONNull
 
JSONObject - cn.hutool.json中的类
JSON对象
例:
json = new JSONObject().put("JSON", "Hello, World!
JSONObject() - 类 的构造器cn.hutool.json.JSONObject
构造,初始容量为 JSONObject.DEFAULT_CAPACITY,KEY无序
JSONObject(boolean) - 类 的构造器cn.hutool.json.JSONObject
构造,初始容量为 JSONObject.DEFAULT_CAPACITY
JSONObject(int, boolean) - 类 的构造器cn.hutool.json.JSONObject
构造
JSONObject(int, boolean, boolean) - 类 的构造器cn.hutool.json.JSONObject
已过时。
isOrder无效
JSONObject(JSONConfig) - 类 的构造器cn.hutool.json.JSONObject
构造
JSONObject(int, JSONConfig) - 类 的构造器cn.hutool.json.JSONObject
构造
JSONObject(Object) - 类 的构造器cn.hutool.json.JSONObject
构建JSONObject,JavaBean默认忽略null值,其它对象不忽略,规则如下: value为Map,将键值对加入JSON对象 value为JSON字符串(CharSequence),使用JSONTokener解析 value为JSONTokener,直接解析 value为普通JavaBean,如果为普通的JavaBean,调用其getters方法(getXXX或者isXXX)获得值,加入到JSON对象。
JSONObject(Object, boolean) - 类 的构造器cn.hutool.json.JSONObject
构建JSONObject,规则如下: value为Map,将键值对加入JSON对象 value为JSON字符串(CharSequence),使用JSONTokener解析 value为JSONTokener,直接解析 value为普通JavaBean,如果为普通的JavaBean,调用其getters方法(getXXX或者isXXX)获得值,加入到JSON对象。
JSONObject(Object, boolean, boolean) - 类 的构造器cn.hutool.json.JSONObject
已过时。
isOrder参数不再需要,JSONObject默认有序!
JSONObject(Object, JSONConfig) - 类 的构造器cn.hutool.json.JSONObject
构建JSONObject,规则如下: value为Map,将键值对加入JSON对象 value为JSON字符串(CharSequence),使用JSONTokener解析 value为JSONTokener,直接解析 value为普通JavaBean,如果为普通的JavaBean,调用其getters方法(getXXX或者isXXX)获得值,加入到JSON对象。
JSONObject(Object, JSONConfig, Filter<MutablePair<String, Object>>) - 类 的构造器cn.hutool.json.JSONObject
构建JSONObject,规则如下: value为Map,将键值对加入JSON对象 value为JSON字符串(CharSequence),使用JSONTokener解析 value为JSONTokener,直接解析 value为普通JavaBean,如果为普通的JavaBean,调用其getters方法(getXXX或者isXXX)获得值,加入到JSON对象。
JSONObject(Object, String...) - 类 的构造器cn.hutool.json.JSONObject
构建指定name列表对应的键值对为新的JSONObject,情况如下: 1.
JSONObject(CharSequence, boolean) - 类 的构造器cn.hutool.json.JSONObject
已过时。
isOrder无效
JSONObjectIter - cn.hutool.json中的类
此类用于在JSONAray中便于遍历JSONObject而封装的Iterable,可以借助foreach语法遍历
JSONObjectIter(Iterator<Object>) - 类 的构造器cn.hutool.json.JSONObjectIter
 
JSONObjectSerializer<V> - cn.hutool.json.serialize中的接口
对象的序列化接口,用于将特定对象序列化为JSONObject
JSONParser - cn.hutool.json中的类
JSON字符串解析器
JSONParser(JSONTokener) - 类 的构造器cn.hutool.json.JSONParser
构造
JSONSerializer<T extends JSON,V> - cn.hutool.json.serialize中的接口
序列化接口,通过实现此接口,实现自定义的对象转换为JSON的操作
JSONStrFormatter - cn.hutool.json中的类
JSON字符串格式化工具,用于简单格式化JSON字符串
from http://blog.csdn.net/lovelong8808/article/details/54580278
JSONStrFormatter() - 类 的构造器cn.hutool.json.JSONStrFormatter
 
JSONString - cn.hutool.json中的接口
JSONString接口定义了一个toJSONString()
实现此接口的类可以通过实现toJSONString()方法来改变转JSON字符串的方式。
JSONSupport - cn.hutool.json中的类
JSON支持
继承此类实现实体类与JSON的相互转换
JSONSupport() - 类 的构造器cn.hutool.json.JSONSupport
 
jsonToBean(Type, Object, boolean) - 类 中的静态方法cn.hutool.json.JSONConverter
JSON递归转换
首先尝试JDK类型转换,如果失败尝试JSON转Bean
JSONTokener - cn.hutool.json中的类
JSON解析器,用于将JSON字符串解析为JSONObject或者JSONArray
JSONTokener(Reader, JSONConfig) - 类 的构造器cn.hutool.json.JSONTokener
从Reader中构建
JSONTokener(InputStream, JSONConfig) - 类 的构造器cn.hutool.json.JSONTokener
从InputStream中构建,使用UTF-8编码
JSONTokener(CharSequence, JSONConfig) - 类 的构造器cn.hutool.json.JSONTokener
从字符串中构建
JSONUtil - cn.hutool.json中的类
JSON工具类
JSONUtil() - 类 的构造器cn.hutool.json.JSONUtil
 
JSONWriter - cn.hutool.json.serialize中的类
JSON数据写出器
通过简单的append方式将JSON的键值对等信息写出到Writer中。
JSONWriter(Writer, int, int, JSONConfig) - 类 的构造器cn.hutool.json.serialize.JSONWriter
构造
JSONXMLParser - cn.hutool.json.xml中的类
XML解析器,将XML解析为JSON对象
JSONXMLParser() - 类 的构造器cn.hutool.json.xml.JSONXMLParser
 
JSONXMLSerializer - cn.hutool.json.xml中的类
JSON转XML字符串工具
JSONXMLSerializer() - 类 的构造器cn.hutool.json.xml.JSONXMLSerializer
 

L

lastIndexOf(Object) - 类 中的方法cn.hutool.json.JSONArray
 
listIterator() - 类 中的方法cn.hutool.json.JSONArray
 
listIterator(int) - 类 中的方法cn.hutool.json.JSONArray
 
LT - 类 中的静态变量cn.hutool.json.XML
The Character '<'.

M

map(JSONObject, Filter<MutablePair<String, Object>>) - 类 中的方法cn.hutool.json.ObjectMapper
将给定对象转换为JSONObject
map(JSONArray, Filter<Mutable<Object>>) - 类 中的方法cn.hutool.json.ObjectMapper
初始化
more() - 类 中的方法cn.hutool.json.JSONTokener
源字符串是否有更多的字符

N

next() - 类 中的方法cn.hutool.json.JSONTokener
获得源字符串中的下一个字符
next(char) - 类 中的方法cn.hutool.json.JSONTokener
读取下一个字符,并比对是否和指定字符匹配
next(int) - 类 中的方法cn.hutool.json.JSONTokener
获得接下来的n个字符
nextCDATA() - 类 中的方法cn.hutool.json.XMLTokener
Get the text in the CDATA block.
nextClean() - 类 中的方法cn.hutool.json.JSONTokener
获得下一个字符,跳过空白符
nextContent() - 类 中的方法cn.hutool.json.XMLTokener
Get the next XML outer token, trimming whitespace.
nextEntity(char) - 类 中的方法cn.hutool.json.XMLTokener
Return the next entity.
nextMeta() - 类 中的方法cn.hutool.json.XMLTokener
Returns the next XML meta token.
nextString(char) - 类 中的方法cn.hutool.json.JSONTokener
返回当前位置到指定引号前的所有字符,反斜杠的转义符也会被处理。
nextTo(char) - 类 中的方法cn.hutool.json.JSONTokener
Get the text up but not including the specified character or the end of line, whichever comes first.
nextTo(String) - 类 中的方法cn.hutool.json.JSONTokener
Get the text up but not including one of the specified delimiter characters or the end of line, whichever comes first.
nextToken() - 类 中的方法cn.hutool.json.XMLTokener
Get the next XML Token.
nextValue() - 类 中的方法cn.hutool.json.JSONTokener
获得下一个值,值类型可以是Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the JSONObject.NULL
NULL - 类 中的静态变量cn.hutool.json.JSONNull
NULL 对象用于减少歧义来表示Java 中的null
NULL.equals(null) 返回 true.

O

ObjectMapper - cn.hutool.json中的类
对象和JSON映射器,用于转换对象为JSON,支持: Map 转 JSONObject,将键值对加入JSON对象 Map.Entry 转 JSONObject CharSequence 转 JSONObject,使用JSONTokener解析 Reader 转 JSONObject,使用JSONTokener解析 InputStream 转 JSONObject,使用JSONTokener解析 JSONTokener 转 JSONObject,直接解析 ResourceBundle 转 JSONObject Bean 转 JSONObject,调用其getters方法(getXXX或者isXXX)获得值,加入到JSON对象。
ObjectMapper(Object) - 类 的构造器cn.hutool.json.ObjectMapper
构造
of(JSONTokener) - 类 中的静态方法cn.hutool.json.JSONParser
创建JSONParser
of(Object) - 类 中的静态方法cn.hutool.json.ObjectMapper
创建ObjectMapper
of(Writer, int, int, JSONConfig) - 类 中的静态方法cn.hutool.json.serialize.JSONWriter
创建JSONWriter

P

parse(T) - 接口 中的方法cn.hutool.json.JSONBeanParser
value转Bean
通过实现此接口,将JSON中的值填充到当前对象的字段值中,即对象自行实现JSON反序列化逻辑
parse(String) - 类 中的方法cn.hutool.json.JSONSupport
JSON String转Bean
parse(JSON) - 类 中的方法cn.hutool.json.JSONSupport
JSON转Bean
parse(Object) - 类 中的静态方法cn.hutool.json.JSONUtil
转换对象为JSON,如果用户不配置JSONConfig,则JSON的有序与否与传入对象有关。
parse(Object, JSONConfig) - 类 中的静态方法cn.hutool.json.JSONUtil
转换对象为JSON,如果用户不配置JSONConfig,则JSON的有序与否与传入对象有关。
parseArray(String) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转JSONArray
parseArray(Object) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转JSONArray
parseArray(Object, JSONConfig) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转JSONArray
parseArray(Object, boolean) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转JSONArray
parseFromXml(String) - 类 中的静态方法cn.hutool.json.JSONUtil
XML字符串转为JSONObject
parseJSONObject(JSONObject, String, boolean) - 类 中的静态方法cn.hutool.json.xml.JSONXMLParser
转换XML为JSONObject 转换过程中一些信息可能会丢失,JSON中无法区分节点和属性,相同的节点将被处理为JSONArray。
parseObj(String) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转JSONObject对象
parseObj(Object) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转JSONObject对象
此方法会忽略空值,但是对JSON字符串不影响
parseObj(Object, JSONConfig) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转JSONObject对象
此方法会忽略空值,但是对JSON字符串不影响
parseObj(Object, boolean) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转JSONObject对象
parseObj(Object, boolean, boolean) - 类 中的静态方法cn.hutool.json.JSONUtil
已过时。
isOrder参数不再有效
parseTo(JSONObject, Filter<MutablePair<String, Object>>) - 类 中的方法cn.hutool.json.JSONParser
解析JSONTokener中的字符到目标的JSONObject
parseTo(JSONArray, Filter<Mutable<Object>>) - 类 中的方法cn.hutool.json.JSONParser
解析JSON字符串到JSONArray
put(Object) - 类 中的方法cn.hutool.json.JSONArray
Append an object value.
put(int, Object) - 类 中的方法cn.hutool.json.JSONArray
加入或者替换JSONArray中指定Index的值,如果index大于JSONArray的长度,将在指定index设置值,之前的位置填充JSONNull.Null
put(String, Object) - 类 中的方法cn.hutool.json.JSONObject
已过时。
此方法存在歧义,原Map接口返回的是之前的值,重写后返回this了,未来版本此方法会修改,请使用JSONObject.set(String, Object)
put(Type, JSONArraySerializer<?>) - 类 中的静态方法cn.hutool.json.serialize.GlobalSerializeMapping
加入自定义的序列化器
put(Type, JSONObjectSerializer<?>) - 类 中的静态方法cn.hutool.json.serialize.GlobalSerializeMapping
加入自定义的序列化器
put(Type, JSONDeserializer<?>) - 类 中的静态方法cn.hutool.json.serialize.GlobalSerializeMapping
加入自定义的反序列化器
putAll(Map<? extends String, ?>) - 类 中的方法cn.hutool.json.JSONObject
 
putByPath(String, Object) - 接口 中的方法cn.hutool.json.JSON
设置表达式指定位置(或filed对应)的值
若表达式指向一个JSONArray则设置其坐标对应位置的值,若指向JSONObject则put对应key的值
注意:如果为JSONArray,设置值下标小于其长度,将替换原有值,否则追加新值
.表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值 []表达式,可以获取集合等对象中对应index的值 表达式栗子: persion persion.name persons[3] person.friends[5].name
putByPath(String, Object) - 类 中的方法cn.hutool.json.JSONArray
 
putByPath(String, Object) - 类 中的方法cn.hutool.json.JSONObject
 
putByPath(JSON, String, Object) - 类 中的静态方法cn.hutool.json.JSONUtil
设置表达式指定位置(或filed对应)的值
若表达式指向一个JSONArray则设置其坐标对应位置的值,若指向JSONObject则put对应key的值
注意:如果为JSONArray,则设置值得下标不能大于已有JSONArray的长度
.表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值 []表达式,可以获取集合等对象中对应index的值 表达式栗子: persion persion.name persons[3] person.friends[5].name
putDeserializer(Type, JSONDeserializer<?>) - 类 中的静态方法cn.hutool.json.JSONUtil
加入自定义的反序列化器
putOnce(String, Object) - 类 中的方法cn.hutool.json.JSONObject
一次性Put 键值对,如果key已经存在抛出异常,如果键值中有null值,忽略
putOpt(String, Object) - 类 中的方法cn.hutool.json.JSONObject
在键和值都为非空的情况下put到JSONObject中
putSerializer(Type, JSONArraySerializer<?>) - 类 中的静态方法cn.hutool.json.JSONUtil
加入自定义的序列化器
putSerializer(Type, JSONObjectSerializer<?>) - 类 中的静态方法cn.hutool.json.JSONUtil
加入自定义的序列化器

Q

QUEST - 类 中的静态变量cn.hutool.json.XML
The Character '?'.
QUOT - 类 中的静态变量cn.hutool.json.XML
The Character '"'.
quote(String) - 类 中的静态方法cn.hutool.json.JSONUtil
对所有双引号做转义处理(使用双反斜杠做转义)
为了能在HTML中较好的显示,会将</转义为<\/
JSON字符串中不能包含控制字符和未经转义的引号和反斜杠
quote(String, boolean) - 类 中的静态方法cn.hutool.json.JSONUtil
对所有双引号做转义处理(使用双反斜杠做转义)
为了能在HTML中较好的显示,会将</转义为<\/
JSON字符串中不能包含控制字符和未经转义的引号和反斜杠
quote(String, Writer) - 类 中的静态方法cn.hutool.json.JSONUtil
对所有双引号做转义处理(使用双反斜杠做转义)
为了能在HTML中较好的显示,会将</转义为<\/
JSON字符串中不能包含控制字符和未经转义的引号和反斜杠
quote(String, Writer, boolean) - 类 中的静态方法cn.hutool.json.JSONUtil
对所有双引号做转义处理(使用双反斜杠做转义)
为了能在HTML中较好的显示,会将</转义为<\/
JSON字符串中不能包含控制字符和未经转义的引号和反斜杠

R

readJSON(File, Charset) - 类 中的静态方法cn.hutool.json.JSONUtil
读取JSON
readJSONArray(File, Charset) - 类 中的静态方法cn.hutool.json.JSONUtil
读取JSONArray
readJSONObject(File, Charset) - 类 中的静态方法cn.hutool.json.JSONUtil
读取JSONObject
remove(int) - 类 中的方法cn.hutool.json.JSONArray
 
remove(Object) - 类 中的方法cn.hutool.json.JSONArray
 
removeAll(Collection<?>) - 类 中的方法cn.hutool.json.JSONArray
 
retainAll(Collection<?>) - 类 中的方法cn.hutool.json.JSONArray
 

S

serialize(T, V) - 接口 中的方法cn.hutool.json.serialize.JSONSerializer
序列化实现,通过实现此方法,将指定类型的对象转换为JSON对象
转换后的对象可以为JSONObject也可以为JSONArray,首先new一个空的JSON,然后将需要的数据字段put到JSON对象中去即可。
serialize(JSONObject, TemporalAccessor) - 类 中的方法cn.hutool.json.serialize.TemporalAccessorSerializer
 
set(Object) - 类 中的方法cn.hutool.json.JSONArray
Append an object value.
set(int, Object) - 类 中的方法cn.hutool.json.JSONArray
加入或者替换JSONArray中指定Index的值,如果index大于JSONArray的长度,将在指定index设置值,之前的位置填充JSONNull.Null
set(int, Object, Filter<MutablePair<Integer, Object>>) - 类 中的方法cn.hutool.json.JSONArray
加入或者替换JSONArray中指定Index的值,如果index大于JSONArray的长度,将在指定index设置值,之前的位置填充JSONNull.Null
set(String, Object) - 类 中的方法cn.hutool.json.JSONObject
设置键值对到JSONObject中,在忽略null模式下,如果值为null,将此键移除
set(String, Object, Filter<MutablePair<String, Object>>, boolean) - 类 中的方法cn.hutool.json.JSONObject
设置键值对到JSONObject中,在忽略null模式下,如果值为null,将此键移除
setDateFormat(String) - 类 中的方法cn.hutool.json.JSONArray
设置转为字符串时的日期格式,默认为时间戳(null值)
setDateFormat(String) - 类 中的方法cn.hutool.json.JSONConfig
设置日期格式,null表示默认的时间戳
此方法设置的日期格式仅对转换为JSON字符串有效,对解析JSON为bean无效。
setDateFormat(String) - 类 中的方法cn.hutool.json.JSONObject
设置转为字符串时的日期格式,默认为时间戳(null值)
此方法设置的日期格式仅对转换为JSON字符串有效,对解析JSON为bean无效。
setIgnoreCase(boolean) - 类 中的方法cn.hutool.json.JSONConfig
设置是否忽略键的大小写
setIgnoreError(boolean) - 类 中的方法cn.hutool.json.JSONConfig
设置是否忽略转换过程中的异常
setIgnoreNullValue(boolean) - 类 中的方法cn.hutool.json.JSONConfig
设置是否忽略null值
setKeyComparator(Comparator<String>) - 类 中的方法cn.hutool.json.JSONConfig
设置键排序规则
键排序规则,null表示不排序,不排序情况下,按照加入顺序排序
setNatureKeyComparator() - 类 中的方法cn.hutool.json.JSONConfig
设置自然排序,即按照字母顺序排序
setOnce(String, Object, Filter<MutablePair<String, Object>>) - 类 中的方法cn.hutool.json.JSONObject
一次性Put 键值对,如果key已经存在抛出异常,如果键值中有null值,忽略
setOrder(boolean) - 类 中的方法cn.hutool.json.JSONConfig
已过时。
始终有序,无需设置
setStripTrailingZeros(boolean) - 类 中的方法cn.hutool.json.JSONConfig
设置是否去除末尾多余0,例如如果为true,5.0返回5
setTransientSupport(boolean) - 类 中的方法cn.hutool.json.JSONConfig
设置是否支持transient关键字修饰和@Transient注解,如果支持,被修饰的字段或方法对应的字段将被忽略。
size() - 类 中的方法cn.hutool.json.JSONArray
 
skipPast(String) - 类 中的方法cn.hutool.json.XMLTokener
Skip characters until past the requested string.
skipTo(char) - 类 中的方法cn.hutool.json.JSONTokener
Skip characters until the next character is the requested character.
SLASH - 类 中的静态变量cn.hutool.json.XML
The Character '/'.
stringToValue(String) - 类 中的静态方法cn.hutool.json.InternalJSONUtil
尝试转换字符串为number, boolean, or null,无法转换返回String
subList(int, int) - 类 中的方法cn.hutool.json.JSONArray
 
syntaxError(String) - 类 中的方法cn.hutool.json.JSONTokener
Make a JSONException to signal a syntax error.

T

TemporalAccessorSerializer - cn.hutool.json.serialize中的类
TemporalAccessor的JSON自定义序列化实现
TemporalAccessorSerializer(Class<? extends TemporalAccessor>) - 类 的构造器cn.hutool.json.serialize.TemporalAccessorSerializer
 
toArray() - 类 中的方法cn.hutool.json.JSONArray
 
toArray(T[]) - 类 中的方法cn.hutool.json.JSONArray
 
toArray(Class<?>) - 类 中的方法cn.hutool.json.JSONArray
转为Bean数组
toArray(JSONArray, Class<?>) - 类 中的静态方法cn.hutool.json.JSONConverter
JSONArray转数组
toBean(Class<T>) - 接口 中的方法cn.hutool.json.JSON
转为实体类对象,转换异常将被抛出
toBean(TypeReference<T>) - 接口 中的方法cn.hutool.json.JSON
转为实体类对象,转换异常将被抛出
toBean(Type) - 接口 中的方法cn.hutool.json.JSON
转为实体类对象
toBean(Type, boolean) - 接口 中的方法cn.hutool.json.JSON
转为实体类对象
toBean(Type) - 类 中的方法cn.hutool.json.JSONArray
 
toBean(Type) - 类 中的方法cn.hutool.json.JSONObject
 
toBean(String, Class<T>) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转为实体类对象,转换异常将被抛出
toBean(String, JSONConfig, Class<T>) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转为实体类对象,转换异常将被抛出
通过JSONConfig可选是否忽略大小写、忽略null等配置
toBean(JSONObject, Class<T>) - 类 中的静态方法cn.hutool.json.JSONUtil
转为实体类对象,转换异常将被抛出
toBean(String, TypeReference<T>, boolean) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转为实体类对象,转换异常将被抛出
toBean(String, Type, boolean) - 类 中的静态方法cn.hutool.json.JSONUtil
JSON字符串转为实体类对象,转换异常将被抛出
toBean(JSON, TypeReference<T>, boolean) - 类 中的静态方法cn.hutool.json.JSONUtil
转为实体类对象
toBean(JSON, Type, boolean) - 类 中的静态方法cn.hutool.json.JSONUtil
转为实体类对象
toJSON() - 类 中的方法cn.hutool.json.JSONSupport
 
toJSONArray(Collection<String>) - 类 中的方法cn.hutool.json.JSONObject
将指定KEY列表的值组成新的JSONArray
toJSONArray() - 类 中的方法cn.hutool.json.JSONTokener
转为 JSONArray
toJSONObject(JSONArray) - 类 中的方法cn.hutool.json.JSONArray
根据给定名列表,与其位置对应的值组成JSONObject
toJSONObject(String) - 类 中的静态方法cn.hutool.json.XML
转换XML为JSONObject 转换过程中一些信息可能会丢失,JSON中无法区分节点和属性,相同的节点将被处理为JSONArray。
toJSONObject(String, boolean) - 类 中的静态方法cn.hutool.json.XML
转换XML为JSONObject 转换过程中一些信息可能会丢失,JSON中无法区分节点和属性,相同的节点将被处理为JSONArray。
toJSONObject(JSONObject, String, boolean) - 类 中的静态方法cn.hutool.json.XML
转换XML为JSONObject 转换过程中一些信息可能会丢失,JSON中无法区分节点和属性,相同的节点将被处理为JSONArray。
toJsonPrettyStr(JSON) - 类 中的静态方法cn.hutool.json.JSONUtil
转为JSON字符串
toJsonPrettyStr(Object) - 类 中的静态方法cn.hutool.json.JSONUtil
转换为格式化后的JSON字符串
toJsonStr(JSON, int) - 类 中的静态方法cn.hutool.json.JSONUtil
转为JSON字符串
toJsonStr(JSON) - 类 中的静态方法cn.hutool.json.JSONUtil
转为JSON字符串
toJsonStr(JSON, Writer) - 类 中的静态方法cn.hutool.json.JSONUtil
转为JSON字符串,并写出到write
toJsonStr(Object) - 类 中的静态方法cn.hutool.json.JSONUtil
转换为JSON字符串
toJsonStr(Object, JSONConfig) - 类 中的静态方法cn.hutool.json.JSONUtil
转换为JSON字符串
toJsonStr(Object, Writer) - 类 中的静态方法cn.hutool.json.JSONUtil
转换为JSON字符串并写出到writer
toJSONString(int) - 接口 中的方法cn.hutool.json.JSON
格式化输出JSON字符串
toJSONString(int, Filter<MutablePair<Integer, Object>>) - 类 中的方法cn.hutool.json.JSONArray
返回JSON字符串
支持过滤器,即选择哪些字段或值不写出
toJSONString(int, Filter<MutablePair<String, Object>>) - 类 中的方法cn.hutool.json.JSONObject
返回JSON字符串
支持过滤器,即选择哪些字段或值不写出
toJSONString() - 接口 中的方法cn.hutool.json.JSONString
自定义转JSON字符串的方法
toJSONString() - 类 中的方法cn.hutool.json.JSONSupport
 
toList(Class<T>) - 类 中的方法cn.hutool.json.JSONArray
转为ArrayList
toList(JSONArray, Class<T>) - 类 中的静态方法cn.hutool.json.JSONConverter
将JSONArray转换为指定类型的对量列表
toList(String, Class<T>) - 类 中的静态方法cn.hutool.json.JSONUtil
将JSONArray字符串转换为Bean的List,默认为ArrayList
toList(JSONArray, Class<T>) - 类 中的静态方法cn.hutool.json.JSONUtil
将JSONArray转换为Bean的List,默认为ArrayList
toPrettyString() - 类 中的方法cn.hutool.json.JSONSupport
美化的JSON(使用回车缩进显示JSON),用于打印输出debug
toString() - 类 中的方法cn.hutool.json.JSONArray
转为JSON字符串,无缩进
toString() - 类 中的方法cn.hutool.json.JSONNull
Get the "null" string value.
toString() - 类 中的方法cn.hutool.json.JSONObject
返回JSON字符串
如果解析错误,返回null
toString() - 类 中的方法cn.hutool.json.JSONSupport
 
toString() - 类 中的方法cn.hutool.json.JSONTokener
Make a printable string of this JSONTokener.
toStringPretty() - 接口 中的方法cn.hutool.json.JSON
格式化打印JSON,缩进为4个空格
toXml(Object) - 类 中的静态方法cn.hutool.json.xml.JSONXMLSerializer
转换JSONObject为XML Convert a JSONObject into a well-formed, element-normal XML string.
toXml(Object, String) - 类 中的静态方法cn.hutool.json.xml.JSONXMLSerializer
转换JSONObject为XML
toXml(Object, String, String...) - 类 中的静态方法cn.hutool.json.xml.JSONXMLSerializer
转换JSONObject为XML
toXml(Object) - 类 中的静态方法cn.hutool.json.XML
转换JSONObject为XML
toXml(Object, String) - 类 中的静态方法cn.hutool.json.XML
转换JSONObject为XML
toXml(Object, String, String...) - 类 中的静态方法cn.hutool.json.XML
转换JSONObject为XML
toXmlStr(JSON) - 类 中的静态方法cn.hutool.json.JSONUtil
转换为XML字符串

W

wrap(Object, JSONConfig) - 类 中的静态方法cn.hutool.json.JSONUtil
在需要的时候包装对象
包装包括: null =》 JSONNull.NULL array or collection =》 JSONArray map =》 JSONObject standard property (Double, String, et al) =》 原对象 来自于java包 =》 字符串 其它 =》 尝试包装为JSONObject,否则返回null
write(Writer) - 接口 中的方法cn.hutool.json.JSON
将JSON内容写入Writer,无缩进
Warning: This method assumes that the data structure is acyclical.
write(Writer, int, int) - 接口 中的方法cn.hutool.json.JSON
将JSON内容写入Writer
Warning: This method assumes that the data structure is acyclical.
write(Writer, int, int) - 类 中的方法cn.hutool.json.JSONArray
 
write(Writer, int, int, Filter<MutablePair<Integer, Object>>) - 类 中的方法cn.hutool.json.JSONArray
将JSON内容写入Writer
支持过滤器,即选择哪些字段或值不写出
write(Writer, int, int) - 类 中的方法cn.hutool.json.JSONObject
 
write(Writer, int, int, Filter<MutablePair<String, Object>>) - 类 中的方法cn.hutool.json.JSONObject
将JSON内容写入Writer
支持过滤器,即选择哪些字段或值不写出
write(char[], int, int) - 类 中的方法cn.hutool.json.serialize.JSONWriter
 
writeField(String, Object) - 类 中的方法cn.hutool.json.serialize.JSONWriter
写出字段名及字段值,如果字段值是null且忽略null值,则不写出任何内容
writeKey(String) - 类 中的方法cn.hutool.json.serialize.JSONWriter
写出键,自动处理分隔符和缩进,并包装键名
writeValue(Object) - 类 中的方法cn.hutool.json.serialize.JSONWriter
写出值,自动处理分隔符和缩进,自动判断类型,并根据不同类型写出特定格式的值
如果写出的值为null或者JSONNull,且配置忽略null,则跳过。

X

XML - cn.hutool.json中的类
提供静态方法在XML和JSONObject之间转换
XML() - 类 的构造器cn.hutool.json.XML
 
xmlToJson(String) - 类 中的静态方法cn.hutool.json.JSONUtil
XML转JSONObject
转换过程中一些信息可能会丢失,JSON中无法区分节点和属性,相同的节点将被处理为JSONArray。
XMLTokener - cn.hutool.json中的类
XML分析器,继承自JSONTokener,提供XML的语法分析
XMLTokener(CharSequence, JSONConfig) - 类 的构造器cn.hutool.json.XMLTokener
Construct an XMLTokener from a string.
A B C D E F G H I J L M N O P Q R S T W X 
跳过导航链接

Copyright © 2022. All rights reserved.