Class DJsonContext
java.lang.Object
io.ebeaninternal.server.json.DJsonContext
- All Implemented Interfaces:
io.ebean.text.json.JsonContext, SpiJsonContext
Default implementation of JsonContext.
-
Constructor Summary
ConstructorsConstructorDescriptionDJsonContext(SpiEbeanServer server, io.avaje.json.stream.JsonStream jsonStream, TypeManager typeManager) -
Method Summary
Modifier and TypeMethodDescription<T> DJsonBeanReader<T> createBeanReader(io.ebean.plugin.BeanType<T> beanType, io.avaje.json.JsonReader parser, io.ebean.text.json.JsonReadOptions options) <T> DJsonBeanReader<T> createBeanReader(Class<T> cls, io.avaje.json.JsonReader parser, io.ebean.text.json.JsonReadOptions options) io.avaje.json.JsonWritercreateGenerator(Writer writer) createJsonRead(io.ebean.plugin.BeanType<?> beanType, String json) Create a Json Reader for reading the JSON content.createJsonWriter(io.avaje.json.JsonWriter gen, io.ebean.text.json.JsonWriteOptions options) Create a Json Writer for writing beans as JSON.createJsonWriter(Writer writer) Create a Json Writer for writing beans as JSON supplying a writer.io.avaje.json.JsonReadercreateParser(Reader reader) booleanisSupportedType(Type genericType) <T> T<T> T<T> T<T> T<T> T<T> T<T> voidtoBean(T target, io.avaje.json.JsonReader parser) <T> voidtoBean(T target, io.avaje.json.JsonReader parser, io.ebean.text.json.JsonReadOptions options) <T> void<T> void<T> void<T> voidvoidvoidvoidvoidvoidvoidtoJsonPretty(Object value) <T> List<T> <T> List<T> <T> List<T> <T> List<T> <T> List<T> <T> List<T> voidwriteScalar(io.avaje.json.JsonWriter generator, Object scalarValue)
-
Constructor Details
-
DJsonContext
public DJsonContext(SpiEbeanServer server, io.avaje.json.stream.JsonStream jsonStream, TypeManager typeManager)
-
-
Method Details
-
writeScalar
- Specified by:
writeScalarin interfaceio.ebean.text.json.JsonContext- Throws:
IOException
-
isSupportedType
- Specified by:
isSupportedTypein interfaceio.ebean.text.json.JsonContext
-
createGenerator
public io.avaje.json.JsonWriter createGenerator(Writer writer) throws io.ebean.text.json.JsonIOException - Specified by:
createGeneratorin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
createParser
public io.avaje.json.JsonReader createParser(Reader reader) throws io.ebean.text.json.JsonIOException - Specified by:
createParserin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toBean
-
toBean
-
toBean
-
toBean
-
toBean
public <T> T toBean(Class<T> cls, io.avaje.json.JsonReader parser) throws io.ebean.text.json.JsonIOException - Specified by:
toBeanin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toBean
public <T> T toBean(Class<T> cls, io.avaje.json.JsonReader parser, io.ebean.text.json.JsonReadOptions options) throws io.ebean.text.json.JsonIOException - Specified by:
toBeanin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toBean
- Specified by:
toBeanin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toBean
public <T> void toBean(T target, String json, io.ebean.text.json.JsonReadOptions options) throws io.ebean.text.json.JsonIOException - Specified by:
toBeanin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toBean
- Specified by:
toBeanin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toBean
public <T> void toBean(T target, Reader jsonReader, io.ebean.text.json.JsonReadOptions options) throws io.ebean.text.json.JsonIOException - Specified by:
toBeanin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toBean
public <T> void toBean(T target, io.avaje.json.JsonReader parser) throws io.ebean.text.json.JsonIOException - Specified by:
toBeanin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toBean
public <T> void toBean(T target, io.avaje.json.JsonReader parser, io.ebean.text.json.JsonReadOptions options) throws io.ebean.text.json.JsonIOException - Specified by:
toBeanin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
createBeanReader
public <T> DJsonBeanReader<T> createBeanReader(Class<T> cls, io.avaje.json.JsonReader parser, io.ebean.text.json.JsonReadOptions options) throws io.ebean.text.json.JsonIOException - Specified by:
createBeanReaderin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
createBeanReader
public <T> DJsonBeanReader<T> createBeanReader(io.ebean.plugin.BeanType<T> beanType, io.avaje.json.JsonReader parser, io.ebean.text.json.JsonReadOptions options) throws io.ebean.text.json.JsonIOException - Specified by:
createBeanReaderin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toList
-
toList
-
toList
-
toList
-
toList
-
toList
-
toObject
-
toObject
-
toObject
-
toJson
public void toJson(Object value, io.avaje.json.JsonWriter generator) throws io.ebean.text.json.JsonIOException - Specified by:
toJsonin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toJson
public void toJson(Object value, io.avaje.json.JsonWriter generator, io.ebean.FetchPath fetchPath) throws io.ebean.text.json.JsonIOException - Specified by:
toJsonin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toJson
public void toJson(Object o, io.avaje.json.JsonWriter generator, io.ebean.text.json.JsonWriteOptions options) throws io.ebean.text.json.JsonIOException - Specified by:
toJsonin interfaceio.ebean.text.json.JsonContext- Throws:
io.ebean.text.json.JsonIOException
-
toJson
-
toJson
-
toJson
-
toJson
-
toJsonPretty
-
toJson
-
toJson
-
createJsonRead
Description copied from interface:SpiJsonContextCreate a Json Reader for reading the JSON content.- Specified by:
createJsonReadin interfaceSpiJsonContext
-
createJsonWriter
Description copied from interface:SpiJsonContextCreate a Json Writer for writing beans as JSON supplying a writer.- Specified by:
createJsonWriterin interfaceSpiJsonContext
-
createJsonWriter
public SpiJsonWriter createJsonWriter(io.avaje.json.JsonWriter gen, io.ebean.text.json.JsonWriteOptions options) Description copied from interface:SpiJsonContextCreate a Json Writer for writing beans as JSON.- Specified by:
createJsonWriterin interfaceSpiJsonContext
-