net.derquinse.common.gson
Class GsonByteString

java.lang.Object
  extended by net.derquinse.common.gson.GsonByteString
All Implemented Interfaces:
JsonDeserializer<ByteString>, JsonSerializer<ByteString>

public final class GsonByteString
extends Object
implements JsonSerializer<ByteString>, JsonDeserializer<ByteString>

Gson representation for ByteString.

Author:
Andres Rodriguez

Constructor Summary
GsonByteString()
          Constructor.
 
Method Summary
 ByteString deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
           
 JsonElement serialize(ByteString src, Type typeOfSrc, JsonSerializationContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GsonByteString

public GsonByteString()
Constructor.

Method Detail

serialize

public JsonElement serialize(ByteString src,
                             Type typeOfSrc,
                             JsonSerializationContext context)
Specified by:
serialize in interface JsonSerializer<ByteString>

deserialize

public ByteString deserialize(JsonElement json,
                              Type typeOfT,
                              JsonDeserializationContext context)
                       throws JsonParseException
Specified by:
deserialize in interface JsonDeserializer<ByteString>
Throws:
JsonParseException


Copyright © 2012 Derquinse Projects.. All Rights Reserved.