public class JsonRecordParser<E> extends Object implements RecordParser<E>
RecordParser}, serializes and deserializes a an
object E to json string.RecordParser| Modifier and Type | Field and Description |
|---|---|
Class<E> |
clazz |
static com.google.gson.Gson |
gson |
| Constructor and Description |
|---|
JsonRecordParser(Class<E> clazz) |
public E decode(String record)
RecordParserdecode in interface RecordParser<E>record - the string containing the serialized objectpublic String encode(E obj)
RecordParserencode in interface RecordParser<E>obj - the object to serializeCopyright © 2013. All rights reserved.