public class JohnzonJsonb extends Object implements javax.json.bind.Jsonb, AutoCloseable
Modifier and Type | Field and Description |
---|---|
private org.apache.johnzon.mapper.Mapper |
delegate |
Constructor and Description |
---|
JohnzonJsonb(org.apache.johnzon.mapper.Mapper build) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
<T> T |
fromJson(InputStream stream,
Class<T> type) |
<T> T |
fromJson(InputStream stream,
Type runtimeType) |
<T> T |
fromJson(Reader reader,
Class<T> type) |
<T> T |
fromJson(Reader reader,
Type runtimeType) |
<T> T |
fromJson(String str,
Class<T> type) |
<T> T |
fromJson(String str,
Type runtimeType) |
private boolean |
isArray(Type runtimeType) |
private boolean |
isCollection(Type runtimeType) |
private Object[] |
toArray(Object object) |
String |
toJson(Object inObject) |
void |
toJson(Object inObject,
OutputStream stream) |
String |
toJson(Object inObject,
Type runtimeType) |
void |
toJson(Object inObject,
Type runtimeType,
OutputStream stream) |
void |
toJson(Object inObject,
Type runtimeType,
Writer writer) |
void |
toJson(Object inObject,
Writer writer) |
private Object |
unwrapOptional(Object inObject) |
private Type |
unwrapPrimitiveOptional(Type type) |
private <T> T |
wrapPrimitiveOptional(Object object,
Type type) |
public <T> T fromJson(String str, Class<T> type) throws javax.json.bind.JsonbException
fromJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public <T> T fromJson(String str, Type runtimeType) throws javax.json.bind.JsonbException
fromJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public <T> T fromJson(Reader reader, Class<T> type) throws javax.json.bind.JsonbException
fromJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public <T> T fromJson(Reader reader, Type runtimeType) throws javax.json.bind.JsonbException
fromJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public <T> T fromJson(InputStream stream, Class<T> type) throws javax.json.bind.JsonbException
fromJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public <T> T fromJson(InputStream stream, Type runtimeType) throws javax.json.bind.JsonbException
fromJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public String toJson(Object inObject) throws javax.json.bind.JsonbException
toJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public String toJson(Object inObject, Type runtimeType) throws javax.json.bind.JsonbException
toJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public void toJson(Object inObject, Writer writer) throws javax.json.bind.JsonbException
toJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public void toJson(Object inObject, Type runtimeType, Writer writer) throws javax.json.bind.JsonbException
toJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public void toJson(Object inObject, OutputStream stream) throws javax.json.bind.JsonbException
toJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
public void toJson(Object inObject, Type runtimeType, OutputStream stream) throws javax.json.bind.JsonbException
toJson
in interface javax.json.bind.Jsonb
javax.json.bind.JsonbException
private boolean isArray(Type runtimeType)
private boolean isCollection(Type runtimeType)
public void close()
close
in interface AutoCloseable
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.