Package | Description |
---|---|
com.owlike.genson |
This package contains Genson base classes, to start
with have a look at
Genson . |
com.owlike.genson.convert |
This package provides some default
Converter implementations and
the chained factory and converter decorator mechanisms. |
com.owlike.genson.ext.guava | |
com.owlike.genson.ext.jodatime | |
com.owlike.genson.ext.jsr353 | |
com.owlike.genson.reflect |
This package contains the core api providing databinding support for complex objects.
|
com.owlike.genson.stream |
This package provides the streaming api used to read and write to streams.
|
Modifier and Type | Method and Description |
---|---|
ObjectWriter |
Genson.createWriter(OutputStream os)
Creates a new ObjectWriter with this Genson instance configuration and default encoding to
UTF8.
|
ObjectWriter |
Genson.createWriter(OutputStream os,
Charset charset)
Creates a new ObjectWriter with this Genson instance configuration.
|
ObjectWriter |
Genson.createWriter(Writer writer)
Creates a new ObjectWriter with this Genson instance configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
Genson.serialize(Object object,
ObjectWriter writer,
Context ctx)
Serializes this object and writes its representation to writer.
|
void |
Genson.serialize(Object object,
Type type,
ObjectWriter writer,
Context ctx)
Serializes this object and writes its representation to writer.
|
void |
Serializer.serialize(T object,
ObjectWriter writer,
Context ctx) |
void |
Converter.serialize(T object,
ObjectWriter writer,
Context ctx) |
Modifier and Type | Method and Description |
---|---|
void |
DefaultConverters.BigDecimalConverter.serialize(BigDecimal object,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.BigIntegerConverter.serialize(BigInteger object,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.BooleanConverter.serialize(Boolean obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.ByteArrayConverter.serialize(byte[] object,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.ByteArrayAsIntArrayConverter.serialize(byte[] object,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.ByteConverter.serialize(Byte obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.CalendarConverter.serialize(Calendar object,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.CharConverter.serialize(Character obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.TreeSetConverter.serialize(Collection<E> array,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.PriorityQueueConverter.serialize(Collection<E> array,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.CollectionConverter.serialize(Collection<E> array,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.DateConverter.serialize(Date obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.DoubleConverter.serialize(Double obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.FileConverter.serialize(File object,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.FloatConverter.serialize(Float obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.IntegerConverter.serialize(Integer obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.LongConverter.serialize(Long obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.MapConverter.serialize(Map<K,V> obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.TreeMapConverter.serialize(Map<K,V> obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.ComplexMapConverter.serialize(Map<K,V> object,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.NumberConverter.serialize(Number obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.ArrayConverter.serialize(Object array,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.UntypedConverterFactory.UntypedConverter.serialize(Object obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.ShortConverter.serialize(Short obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.StringConverter.serialize(String value,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.TimestampConverter.serialize(Timestamp object,
ObjectWriter writer,
Context ctx) |
void |
RuntimeTypeConverter.serialize(T obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.EnumConverter.serialize(T obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.WrappedRootValueConverter.serialize(T object,
ObjectWriter writer,
Context ctx) |
void |
ClassMetadataConverter.serialize(T obj,
ObjectWriter writer,
Context ctx) |
void |
BeanViewConverter.serialize(T obj,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.URIConverter.serialize(URI object,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.URLConverter.serialize(URL object,
ObjectWriter writer,
Context ctx) |
void |
DefaultConverters.UUIDConverter.serialize(UUID object,
ObjectWriter writer,
Context ctx) |
Modifier and Type | Method and Description |
---|---|
void |
OptionalConverter.serialize(com.google.common.base.Optional<T> object,
ObjectWriter writer,
Context ctx) |
Modifier and Type | Method and Description |
---|---|
void |
DurationConverter.serialize(org.joda.time.Duration object,
ObjectWriter writer,
Context ctx) |
void |
IntervalConverter.serialize(org.joda.time.Interval interval,
ObjectWriter writer,
Context ctx) |
void |
PeriodConverter.serialize(org.joda.time.Period object,
ObjectWriter writer,
Context ctx) |
void |
BaseReadableInstantConverter.serialize(org.joda.time.ReadableInstant object,
ObjectWriter writer,
Context ctx) |
void |
BaseLocalConverter.serialize(T object,
ObjectWriter writer,
Context ctx) |
Modifier and Type | Method and Description |
---|---|
void |
JSR353Bundle.JsonValueConverter.serialize(javax.json.JsonValue value,
ObjectWriter writer,
Context ctx) |
Constructor and Description |
---|
GensonJsonGenerator(ObjectWriter writer) |
Modifier and Type | Method and Description |
---|---|
void |
PropertyAccessor.serialize(Object propertySource,
ObjectWriter writer,
Context ctx) |
void |
BeanDescriptor.serialize(T obj,
ObjectWriter writer,
Context ctx) |
Modifier and Type | Class and Description |
---|---|
class |
JsonWriter |
Modifier and Type | Method and Description |
---|---|
ObjectWriter |
ObjectWriter.beginArray()
Starts to write an array (use it also for collections).
|
ObjectWriter |
ObjectWriter.beginNextObjectMetadata()
This method is a kind of cheat as it allows us to start writing metadata and then still be
able to call beginObject.
|
ObjectWriter |
JsonWriter.beginNextObjectMetadata() |
ObjectWriter |
ObjectWriter.beginObject()
Starts a object, objects are a suite of name/value pairs, values may be literals, arrays or
objects.
|
ObjectWriter |
ObjectWriter.endArray()
Ends the array, if beginArray was not called, implementations should throw an exception.
|
ObjectWriter |
ObjectWriter.endObject()
Ends the object being written, if beginObject was not called an exception will be throwed.
|
ObjectWriter |
ObjectWriter.writeBoolean(Boolean value) |
ObjectWriter |
JsonWriter.writeBoolean(Boolean value) |
ObjectWriter |
ObjectWriter.writeBoolean(String name,
Boolean value) |
ObjectWriter |
JsonWriter.writeBoolean(String name,
Boolean value) |
ObjectWriter |
ObjectWriter.writeBytes(byte[] value) |
ObjectWriter |
JsonWriter.writeBytes(byte[] value) |
ObjectWriter |
ObjectWriter.writeBytes(String name,
byte[] value) |
ObjectWriter |
JsonWriter.writeBytes(String name,
byte[] value) |
ObjectWriter |
ObjectWriter.writeEscapedName(char[] name)
Will write the name without escaping special characters, assuming it has been done by the caller or the string
doesn't contain any character needing to be escaped.
|
ObjectWriter |
JsonWriter.writeEscapedName(char[] name) |
ObjectWriter |
ObjectWriter.writeMetadata(String name,
String value)
Metadata is a suite of name/value pairs, names will be prepended with '@' (handled by the
library).
|
ObjectWriter |
JsonWriter.writeMetadata(String name,
String value) |
ObjectWriter |
ObjectWriter.writeName(String name)
Writes the name of a property.
|
ObjectWriter |
ObjectWriter.writeNull()
Must be called when a null value is encountered.
|
ObjectWriter |
JsonWriter.writeNull() |
ObjectWriter |
ObjectWriter.writeNumber(Number value) |
ObjectWriter |
JsonWriter.writeNumber(Number value) |
ObjectWriter |
ObjectWriter.writeNumber(String name,
Number value) |
ObjectWriter |
JsonWriter.writeNumber(String name,
Number value) |
ObjectWriter |
ObjectWriter.writeString(String value)
Similar to writeValue(String) but is null safe, meaning that if the value is null,
then the write will call writeNull for you.
|
ObjectWriter |
JsonWriter.writeString(String value) |
ObjectWriter |
ObjectWriter.writeString(String name,
String value)
Will write the name and the value, it is just a shortcut for writer.writeName("key").writeString(value).
|
ObjectWriter |
JsonWriter.writeString(String name,
String value) |
ObjectWriter |
ObjectWriter.writeUnsafeValue(String value)
Writes value as is without any pre-processing, it's faster than
writeValue(String)
but should be used only if you know that it is safe. |
ObjectWriter |
ObjectWriter.writeValue(boolean value)
See
writeValue(int) . |
ObjectWriter |
ObjectWriter.writeValue(byte[] value)
Writes an array of bytes as a base64 encoded string.
|
ObjectWriter |
JsonWriter.writeValue(byte[] value) |
ObjectWriter |
ObjectWriter.writeValue(double value)
See
writeValue(int) . |
ObjectWriter |
ObjectWriter.writeValue(float value) |
ObjectWriter |
JsonWriter.writeValue(float value) |
ObjectWriter |
ObjectWriter.writeValue(int value)
Writes a value to the stream.
|
ObjectWriter |
ObjectWriter.writeValue(long value)
See
writeValue(int) . |
ObjectWriter |
ObjectWriter.writeValue(Number value)
See
writeValue(int) . |
ObjectWriter |
ObjectWriter.writeValue(short value)
See
writeValue(int) . |
ObjectWriter |
JsonWriter.writeValue(short value) |
ObjectWriter |
ObjectWriter.writeValue(String value)
See
writeValue(int) . |
Copyright © 2019. All rights reserved.