public class ModelObjectSerializer extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
toJson(Object object)
Serialize the supplied object to JSON and return as a
String. |
static void |
toJson(Object object,
Writer writer)
Serialize the supplied object to JSON and write to the supplied
Writer. |
@Nonnull public static String toJson(@Nonnull Object object) throws IOException
String.object - The object to serialize.String.IOException - Error serializing model object.public static void toJson(@Nonnull Object object, @Nonnull Writer writer) throws IOException
Writer.object - The object to serialize.writer - The writer to output to.IOException - Error serializing model object.Copyright © 2016–2017. All rights reserved.