public interface JsonCodec
| Modifier and Type | Method and Description | 
|---|---|
<T> T | 
fromBuffer(Buffer json,
          Class<T> clazz)
Like  
fromString(String, Class) but with a json Buffer | 
<T> T | 
fromString(String json,
          Class<T> clazz)
Decode the provide  
json string to an object extending clazz. | 
<T> T | 
fromValue(Object json,
         Class<T> toValueType)
Like  
fromString(String, Class) but with a json Object | 
default Buffer | 
toBuffer(Object object)
Like  
toString(Object) but with a json Buffer | 
Buffer | 
toBuffer(Object object,
        boolean pretty)
Like  
toString(Object, boolean) but with a json Buffer | 
default String | 
toString(Object object)
Encode the specified  
object to a string. | 
String | 
toString(Object object,
        boolean pretty)
Encode the specified  
object to a string. | 
static final JsonCodec INSTANCE
<T> T fromString(String json, Class<T> clazz) throws DecodeException
json string to an object extending clazz.json - the json stringclazz - the required object's classDecodeException - anything preventing the decoding<T> T fromBuffer(Buffer json, Class<T> clazz) throws DecodeException
fromString(String, Class) but with a json BufferDecodeException<T> T fromValue(Object json, Class<T> toValueType)
fromString(String, Class) but with a json Objectdefault String toString(Object object) throws EncodeException
object to a string.EncodeExceptionString toString(Object object, boolean pretty) throws EncodeException
object to a string.object - the object to encodepretty - true to format the string prettilyDecodeException - anything preventing the encodingEncodeExceptionBuffer toBuffer(Object object, boolean pretty) throws EncodeException
toString(Object, boolean) but with a json BufferEncodeExceptiondefault Buffer toBuffer(Object object) throws EncodeException
toString(Object) but with a json BufferEncodeExceptionCopyright © 2020 Eclipse. All rights reserved.