- Enclosing interface:
SimpleMapper
public static interface SimpleMapper.Type<T>
Reading and writing with all options such and InputStream, Reader etc.
-
Method Summary
Modifier and TypeMethodDescriptionfromJson(byte[] content) Read the return the value from the json content.fromJson(JsonReader reader) Read the return the value from the reader.fromJson(InputStream inputStream) Read the return the value from the inputStream.Read the return the value from the reader.Read the return the value from the json content.list()Create a list type for this type.map()Create a map type with string keys and this type as the value type.Return as json string.voidtoJson(T value, JsonWriter writer) Write to the given writer.voidtoJson(T value, OutputStream outputStream) Write to the given outputStream.voidWrite to the given writer.byte[]toJsonBytes(T value) Return the value as json content in bytes form.toJsonPretty(T value) Return as json string in pretty format.
-
Method Details
-
list
SimpleMapper.Type<List<T>> list()Create a list type for this type. -
map
SimpleMapper.Type<Map<String,T>> map()Create a map type with string keys and this type as the value type. -
fromJson
Read the return the value from the json content. -
fromJson
Read the return the value from the reader. -
fromJson
Read the return the value from the json content. -
fromJson
Read the return the value from the reader. -
fromJson
Read the return the value from the inputStream. -
toJson
Return as json string. -
toJsonPretty
Return as json string in pretty format. -
toJsonBytes
Return the value as json content in bytes form. -
toJson
Write to the given writer. -
toJson
Write to the given writer. -
toJson
Write to the given outputStream.
-