Interface JsonContext


public interface JsonContext
Converts objects to and from JSON format.
  • Method Summary

    Modifier and Type
    Method
    Description
    createBeanReader(BeanType<T> beanType, com.fasterxml.jackson.core.JsonParser parser, JsonReadOptions options)
    Create and return a new bean reading for the bean type given the JSON options and source.
    createBeanReader(Class<T> cls, com.fasterxml.jackson.core.JsonParser parser, JsonReadOptions options)
    Create and return a new bean reading for the bean type given the JSON options and source.
    com.fasterxml.jackson.core.JsonGenerator
    Create and return a new JsonGenerator for the given writer.
    com.fasterxml.jackson.core.JsonParser
    Create and return a new JsonParser for the given reader.
    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.
    <T> void
    toBean(T target, com.fasterxml.jackson.core.JsonParser parser)
    Read json parser input into a given Bean.
    <T> void
    toBean(T target, com.fasterxml.jackson.core.JsonParser parser, JsonReadOptions options)
    Read json parser input into a given Bean additionally using JsonReadOptions.
    See toBean(Class, JsonParser) for details modified.
    <T> void
    toBean(T target, Reader json)
    Read json reader input into a given Bean.
    See toBean(Class, JsonParser) for details
    <T> void
    toBean(T target, Reader json, JsonReadOptions options)
    Read json reader input into a given Bean additionally using JsonReadOptions.
    See toBean(Class, JsonParser) for details modified.
    <T> void
    toBean(T target, String json)
    Read json string input into a given Bean.
    See toBean(Class, JsonParser) for details
    <T> void
    toBean(T target, String json, JsonReadOptions options)
    Read json string input into a given Bean additionally using JsonReadOptions.
    See toBean(Class, JsonParser) for details
    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, FetchPath fetchPath)
    Write the bean or collection to the JsonGenerator using the FetchPath.
    void
    toJson(Object value, com.fasterxml.jackson.core.JsonGenerator generator, JsonWriteOptions options)
    Deprecated in favour of using PathProperties by itself.
    toJson(Object value, FetchPath fetchPath)
    Return the bean or collection as JSON string using FetchPath.
    toJson(Object value, JsonWriteOptions options)
    Deprecated in favour of using PathProperties by itself.
    void
    toJson(Object value, Writer writer)
    Write the bean or collection in JSON format to the writer.
    void
    toJson(Object value, Writer writer, FetchPath fetchPath)
    Write the bean or collection as json to the writer using the FetchPath.
    void
    toJson(Object value, Writer writer, JsonWriteOptions options)
    Deprecated in favour of using PathProperties by itself.
    Return the bean or collection as JSON string in pretty format.
    <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.
    toObject(Type genericType, com.fasterxml.jackson.core.JsonParser jsonParser)
    Use the genericType to determine if this should be converted into a List or bean.
    toObject(Type genericType, Reader json)
    Use the genericType to determine if this should be converted into a List or bean.
    toObject(Type genericType, String json)
    Use the genericType to determine if this should be converted into a List or bean.
    void
    writeScalar(com.fasterxml.jackson.core.JsonGenerator generator, Object scalarValue)
    Write a scalar types known to Ebean to Jackson.