public class JSONEnumConvertor extends Object implements JSON.Convertor
Enum
to JSON.
If fromJSON is true in the constructor, the JSON generated will
be of the form {class="com.acme.TrafficLight",value="Green"}
If fromJSON is false, then only the string value of the enum is generated.Constructor and Description |
---|
JSONEnumConvertor() |
JSONEnumConvertor(boolean fromJSON) |
public JSONEnumConvertor()
public JSONEnumConvertor(boolean fromJSON)
public Object fromJSON(Map map)
fromJSON
in interface JSON.Convertor
public void toJSON(Object obj, JSON.Output out)
toJSON
in interface JSON.Convertor
Copyright © 1995-2015 Webtide. All Rights Reserved.