类 BasicJsonWriter
java.lang.Object
cn.taketoday.aot.nativex.BasicJsonWriter
Very basic json writer for the purposes of translating runtime hints to native
configuration.
- 作者:
- Stephane Nicoll, Harry Yang
-
嵌套类概要
嵌套类 -
字段概要
字段 -
构造器概要
构造器构造器说明BasicJsonWriter(Writer writer) Create a new instance using two whitespaces for the indent.BasicJsonWriter(Writer writer, String singleIndent) Create a new instance with the specified indent value. -
方法概要
修饰符和类型方法说明private static Stringescape(CharSequence input) private Stringprivate <T> RunnablevoidwriteArray(List<?> items) Write an array with the specified items.private voidwriteArray(List<?> items, boolean newLine) private voidwriteAttribute(String name, Object value) voidwriteObject(Map<String, Object> attributes) Write an object with the specified attributes.private voidwriteObject(Map<String, Object> attributes, boolean newLine) private voidwriteValue(Object value)
-
字段详细资料
-
writer
-
-
构造器详细资料
-
BasicJsonWriter
Create a new instance with the specified indent value.- 参数:
writer- the writer to usesingleIndent- the value of one indent
-
BasicJsonWriter
Create a new instance using two whitespaces for the indent.- 参数:
writer- the writer to use
-
-
方法详细资料
-
writeObject
Write an object with the specified attributes. Each attribute is written according to its value type:- Map: write the value as a nested object
- List: write the value as a nested array
- Otherwise, write a single value
- 参数:
attributes- the attributes of the object
-
writeArray
Write an array with the specified items. Each item in the list is written either as a nested object or as an attribute depending on its type.- 参数:
items- the items to write- 另请参阅:
-
writeObject
-
writeArray
-
writeAll
-
writeAttribute
-
writeValue
-
quote
-
escape
-