package com.dhemery.victor.frankly;

import com.dhemery.victor.io.Codec;
import com.google.gson.Gson;

public class FranklyJsonCodec implements Codec {
    private final Gson gson = new Gson();

    @Override
    public <T> T decode(String put, Class<T> resultType) {
        return null;
    }

    @Override
    public String encode(Object object) {
        return gson.toJson(object);
    }
}

@@ -94,16 +94,52 @@
 on.Gson;
+%0Aimport com.google.gson.GsonBuilder;
 %0A%0Apublic
@@ -219,16 +219,177 @@
 new Gson
+Builder()%0A                .registerTypeAdapter(MessageResponse.class, new MessageResponseParser())%0A                .disableHtmlEscaping()%0A                .create
 ();%0A%0A   
@@ -434,11 +434,22 @@
 ing 
-put
+representation
 , Cl
@@ -488,12 +488,49 @@
 urn 
-null
+gson.fromJson(representation, resultType)
 ;%0A  

Implement Frankly JSON codec.