Class JSONEnumConvertor

  • All Implemented Interfaces:
    JSON.Convertor

    public class JSONEnumConvertor
    extends Object
    implements JSON.Convertor
    Convert an 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.