Package | Description |
---|---|
cn.hutool.json.serialize |
JSON自定义序列化和反序列化接口和默认实现
|
Modifier and Type | Method and Description |
---|---|
JSONWriter |
JSONWriter.beginArray()
JSONArray写出开始,默认写出"["
|
JSONWriter |
JSONWriter.beginObj()
JSONObject写出开始,默认写出"{"
|
JSONWriter |
JSONWriter.end()
结束,默认根据开始的类型,补充"}"或"]"
|
static JSONWriter |
JSONWriter.of(Writer writer,
int indentFactor,
int indent,
JSONConfig config)
创建JSONWriter
|
JSONWriter |
JSONWriter.writeField(MutablePair<Object,Object> pair,
Filter<MutablePair<Object,Object>> filter)
写出字段名及字段值,如果字段值是
null 且忽略null值,则不写出任何内容 |
JSONWriter |
JSONWriter.writeField(String key,
Object value)
Deprecated.
|
JSONWriter |
JSONWriter.writeKey(String key)
写出键,自动处理分隔符和缩进,并包装键名
|
JSONWriter |
JSONWriter.writeValue(Object value)
|
Copyright © 2024. All rights reserved.