Class Mapper

java.lang.Object
org.apache.johnzon.mapper.Mapper
All Implemented Interfaces:
Closeable, AutoCloseable

public class Mapper extends Object implements Closeable
  • Field Details

    • config

      protected final MapperConfig config
    • mappings

      protected final Mappings mappings
    • readerFactory

      protected final jakarta.json.JsonReaderFactory readerFactory
    • generatorFactory

      protected final jakarta.json.stream.JsonGeneratorFactory generatorFactory
    • builderFactory

      protected final jakarta.json.JsonBuilderFactory builderFactory
    • provider

      protected final jakarta.json.spi.JsonProvider provider
    • closeables

      protected final Collection<Closeable> closeables
    • charset

      protected final Charset charset
  • Method Details

    • writeArray

      public <T> void writeArray(Object object, OutputStream stream)
    • writeArray

      public <T> void writeArray(T[] object, OutputStream stream)
    • writeArray

      public <T> void writeArray(T[] object, Writer stream)
    • writeArray

      public <T> void writeArray(Collection<T> object, OutputStream stream)
    • writeArray

      public <T> void writeArray(Collection<T> object, Writer stream)
    • writeIterable

      public <T> void writeIterable(Iterable<T> object, OutputStream stream)
    • writeIterable

      public <T> void writeIterable(Iterable<T> object, Writer stream)
    • toStructure

      public jakarta.json.JsonValue toStructure(Object object)
    • writeObject

      public void writeObject(Object object, Writer stream)
    • writeObjectWithGenerator

      public void writeObjectWithGenerator(Object object, jakarta.json.stream.JsonGenerator generator)
    • writeObject

      public void writeObject(Object object, OutputStream stream)
    • writeArrayAsString

      public String writeArrayAsString(Collection<?> instance)
    • writeArrayAsString

      public <T> String writeArrayAsString(T[] instance)
    • writeObjectAsString

      public String writeObjectAsString(Object instance)
    • readObject

      public <T> T readObject(jakarta.json.JsonValue value, Type clazz)
    • readObject

      public <T> T readObject(String string, Type clazz)
    • readObject

      public <T> T readObject(Reader stream, Type clazz)
    • readObject

      public <T> T readObject(jakarta.json.stream.JsonParser stream, Type clazz)
    • readObject

      public <T> T readObject(InputStream stream, Type clazz)
    • readCollection

      public <T> Collection<T> readCollection(InputStream stream, ParameterizedType genericType)
    • readJohnzonCollection

      public <T> T readJohnzonCollection(InputStream stream, JohnzonCollectionType<T> genericType)
    • readJohnzonCollection

      public <T> T readJohnzonCollection(Reader stream, JohnzonCollectionType<T> genericType)
    • readCollection

      public <T> Collection<T> readCollection(Reader stream, ParameterizedType genericType)
    • readCollection

      public <T> Collection<T> readCollection(jakarta.json.stream.JsonParser stream, ParameterizedType genericType)
    • readArray

      public <T> T[] readArray(Reader stream, Class<T> clazz)
    • readTypedArray

      public <T> T readTypedArray(InputStream stream, Class<?> elementType, Class<T> arrayType)
    • readTypedArray

      public <T> T readTypedArray(Reader stream, Class<?> elementType, Class<T> arrayType)
    • readTypedArray

      public <T> T readTypedArray(jakarta.json.stream.JsonParser parser, Class<?> elementType, Class<T> arrayType)
    • readJsonArray

      public jakarta.json.JsonArray readJsonArray(Reader stream)
    • readJsonArray

      public jakarta.json.JsonArray readJsonArray(jakarta.json.stream.JsonParser stream)
    • readArray

      public <T> T[] readArray(InputStream stream, Class<T> clazz)
    • readJsonArray

      public jakarta.json.JsonArray readJsonArray(InputStream stream)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getBuilderFactory

      public jakarta.json.JsonBuilderFactory getBuilderFactory()
    • getProvider

      public jakarta.json.spi.JsonProvider getProvider()