Class JSONEnumConvertor

java.lang.Object
org.eclipse.jetty.util.ajax.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.
  • Field Details

    • LOG

      private static final Logger LOG
    • _fromJSON

      private boolean _fromJSON
    • _valueOf

      private Method _valueOf
  • Constructor Details

    • JSONEnumConvertor

      public JSONEnumConvertor()
    • JSONEnumConvertor

      public JSONEnumConvertor(boolean fromJSON)
  • Method Details