public class JsonWriter extends Object implements BinderWriter
BinderWriter implementation using org.json library,
JsonWriter serializes POJO into JSON string, the serialization is guided by mapping schema defined in the POJO using Nano annotations.
| Modifier and Type | Field and Description |
|---|---|
protected BinderOptions |
options |
| Constructor and Description |
|---|
JsonWriter() |
JsonWriter(BinderOptions options) |
protected BinderOptions options
public JsonWriter()
public JsonWriter(BinderOptions options)
public void write(Object source, Writer out) throws WriterException, MappingException
BinderWriterwrite in interface BinderWritersource - an POJOout - a character streamWriterException - if writes failMappingExceptionpublic void write(Object source, OutputStream os) throws WriterException, MappingException
BinderWriterwrite in interface BinderWritersource - an POJOos - an output stream of bytes.WriterException - if writes failMappingExceptionpublic String write(Object source) throws WriterException, MappingException
BinderWriterwrite in interface BinderWritersource - an POJOWriterException - if writes failMappingExceptionCopyright © 2016. All rights reserved.