org.plovr
Class CustomPassConfig.CustomPassConfigDeserializer

java.lang.Object
  extended by org.plovr.CustomPassConfig.CustomPassConfigDeserializer
All Implemented Interfaces:
JsonDeserializer<CustomPassConfig>
Enclosing class:
CustomPassConfig

public static class CustomPassConfig.CustomPassConfigDeserializer
extends Object
implements JsonDeserializer<CustomPassConfig>

Unfortunately, CustomPassConfig needs a custom deserializer because "class" is a Java keyword, so having a getClass() setter that returns a String is problematic. All plovr options are hyphenated rather than camel cased, so they do not work out of the box with Gson deserialization.


Constructor Summary
CustomPassConfig.CustomPassConfigDeserializer()
           
 
Method Summary
 CustomPassConfig deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomPassConfig.CustomPassConfigDeserializer

public CustomPassConfig.CustomPassConfigDeserializer()
Method Detail

deserialize

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