public interface JsonContext
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.core.JsonGenerator |
createGenerator(Writer writer)
Create and return a new JsonGenerator for the given writer.
|
com.fasterxml.jackson.core.JsonParser |
createParser(Reader reader)
Create and return a new JsonParser for the given reader.
|
JsonScalar |
getScalar(com.fasterxml.jackson.core.JsonGenerator generator)
Return a helper that can write scalar types known to Ebean to Jackson.
|
boolean |
isSupportedType(Type genericType)
Return true if the type is known as an Entity bean or a List Set or
Map of entity beans.
|
<T> T |
toBean(Class<T> cls,
com.fasterxml.jackson.core.JsonParser parser)
Convert json parser input into a Bean of a specific type.
|
<T> T |
toBean(Class<T> cls,
com.fasterxml.jackson.core.JsonParser parser,
JsonReadOptions options)
Convert json parser input into a Bean of a specific type additionally using JsonReadOptions..
|
<T> T |
toBean(Class<T> rootType,
Reader json)
Convert json reader input into a Bean of a specific type.
|
<T> T |
toBean(Class<T> rootType,
Reader json,
JsonReadOptions options)
Convert json reader input into a Bean of a specific type additionally using JsonReadOptions.
|
<T> T |
toBean(Class<T> rootType,
String json)
Convert json string input into a Bean of a specific type.
|
<T> T |
toBean(Class<T> rootType,
String json,
JsonReadOptions options)
Convert json string input into a Bean of a specific type additionally using JsonReadOptions.
|
String |
toJson(Object value)
Return the bean or collection as JSON string.
|
void |
toJson(Object value,
com.fasterxml.jackson.core.JsonGenerator generator)
Write the bean or collection to the JsonGenerator.
|
void |
toJson(Object value,
com.fasterxml.jackson.core.JsonGenerator generator,
JsonWriteOptions options)
Deprecated in favour of using PathProperties by itself.
|
void |
toJson(Object value,
com.fasterxml.jackson.core.JsonGenerator generator,
PathProperties pathProperties)
Write the bean or collection to the JsonGenerator using the PathProperties.
|
String |
toJson(Object value,
JsonWriteOptions options)
Deprecated in favour of using PathProperties by itself.
|
String |
toJson(Object value,
PathProperties pathProperties)
Return the bean or collection as JSON string using PathProperties.
|
void |
toJson(Object value,
Writer writer)
Write the bean or collection in JSON format to the writer.
|
void |
toJson(Object value,
Writer writer,
JsonWriteOptions options)
Deprecated in favour of using PathProperties by itself.
|
void |
toJson(Object value,
Writer writer,
PathProperties pathProperties)
Write the bean or collection as json to the writer using the PathProperties.
|
<T> List<T> |
toList(Class<T> cls,
com.fasterxml.jackson.core.JsonParser json)
Convert json parser input into a list of beans of a specific type.
|
<T> List<T> |
toList(Class<T> cls,
com.fasterxml.jackson.core.JsonParser json,
JsonReadOptions options)
Convert json parser input into a list of beans of a specific type additionally using JsonReadOptions.
|
<T> List<T> |
toList(Class<T> rootType,
Reader json)
Convert json reader input into a list of beans of a specific type.
|
<T> List<T> |
toList(Class<T> rootType,
Reader json,
JsonReadOptions options)
Convert json reader input into a list of beans of a specific type additionally using JsonReadOptions.
|
<T> List<T> |
toList(Class<T> rootType,
String json)
Convert json string input into a list of beans of a specific type.
|
<T> List<T> |
toList(Class<T> rootType,
String json,
JsonReadOptions options)
Convert json string input into a list of beans of a specific type additionally using JsonReadOptions.
|
Object |
toObject(Type genericType,
com.fasterxml.jackson.core.JsonParser jsonParser)
Use the genericType to determine if this should be converted into a List or
bean.
|
Object |
toObject(Type genericType,
Reader json)
Use the genericType to determine if this should be converted into a List or
bean.
|
Object |
toObject(Type genericType,
String json)
Use the genericType to determine if this should be converted into a List or
bean.
|
<T> T toBean(Class<T> rootType, String json) throws JsonIOException
JsonIOException - When IOException occurs<T> T toBean(Class<T> rootType, String json, JsonReadOptions options) throws JsonIOException
JsonIOException - When IOException occurs<T> T toBean(Class<T> rootType, Reader json) throws JsonIOException
JsonIOException - When IOException occurs<T> T toBean(Class<T> rootType, Reader json, JsonReadOptions options) throws JsonIOException
JsonIOException - When IOException occurs<T> T toBean(Class<T> cls, com.fasterxml.jackson.core.JsonParser parser) throws JsonIOException
JsonIOException - When IOException occurs<T> T toBean(Class<T> cls, com.fasterxml.jackson.core.JsonParser parser, JsonReadOptions options) throws JsonIOException
JsonIOException - When IOException occurs<T> List<T> toList(Class<T> rootType, String json) throws JsonIOException
JsonIOException - When IOException occurs<T> List<T> toList(Class<T> rootType, String json, JsonReadOptions options) throws JsonIOException
JsonIOException - When IOException occurs<T> List<T> toList(Class<T> rootType, Reader json) throws JsonIOException
JsonIOException - When IOException occurs<T> List<T> toList(Class<T> rootType, Reader json, JsonReadOptions options) throws JsonIOException
JsonIOException - When IOException occurs<T> List<T> toList(Class<T> cls, com.fasterxml.jackson.core.JsonParser json) throws JsonIOException
JsonIOException - When IOException occurs<T> List<T> toList(Class<T> cls, com.fasterxml.jackson.core.JsonParser json, JsonReadOptions options) throws JsonIOException
JsonIOException - When IOException occursObject toObject(Type genericType, Reader json) throws JsonIOException
JsonIOException - When IOException occursObject toObject(Type genericType, String json) throws JsonIOException
JsonIOException - When IOException occursObject toObject(Type genericType, com.fasterxml.jackson.core.JsonParser jsonParser) throws JsonIOException
JsonIOException - When IOException occursString toJson(Object value) throws JsonIOException
JsonIOException - When IOException occursvoid toJson(Object value, Writer writer) throws JsonIOException
JsonIOException - When IOException occursvoid toJson(Object value, com.fasterxml.jackson.core.JsonGenerator generator) throws JsonIOException
JsonIOException - When IOException occursString toJson(Object value, PathProperties pathProperties) throws JsonIOException
JsonIOException - When IOException occursvoid toJson(Object value, Writer writer, PathProperties pathProperties) throws JsonIOException
JsonIOExceptionvoid toJson(Object value, com.fasterxml.jackson.core.JsonGenerator generator, PathProperties pathProperties) throws JsonIOException
JsonIOExceptionvoid toJson(Object value, com.fasterxml.jackson.core.JsonGenerator generator, JsonWriteOptions options) throws JsonIOException
JsonIOExceptionvoid toJson(Object value, Writer writer, JsonWriteOptions options) throws JsonIOException
JsonIOException - When IOException occursString toJson(Object value, JsonWriteOptions options) throws JsonIOException
JsonIOException - When IOException occursboolean isSupportedType(Type genericType)
com.fasterxml.jackson.core.JsonGenerator createGenerator(Writer writer) throws JsonIOException
JsonIOException - When IOException occurscom.fasterxml.jackson.core.JsonParser createParser(Reader reader) throws JsonIOException
JsonIOException - When IOException occursJsonScalar getScalar(com.fasterxml.jackson.core.JsonGenerator generator)
Ebean has built in support for java8 and Joda types as well as the other standard JDK types like URI, URL, UUID etc. This is a fast simple way to write any of those types to Jackson.
Copyright © 2015. All rights reserved.