org.eclipse.jetty.util.ajax
类 JSONEnumConvertor

java.lang.Object
  继承者 org.eclipse.jetty.util.ajax.JSONEnumConvertor
所有已实现的接口:
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.


构造方法摘要
JSONEnumConvertor()
           
JSONEnumConvertor(boolean fromJSON)
           
 
方法摘要
 Object fromJSON(Map map)
           
 void toJSON(Object obj, JSON.Output out)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

JSONEnumConvertor

public JSONEnumConvertor()

JSONEnumConvertor

public JSONEnumConvertor(boolean fromJSON)
方法详细信息

fromJSON

public Object fromJSON(Map map)
指定者:
接口 JSON.Convertor 中的 fromJSON

toJSON

public void toJSON(Object obj,
                   JSON.Output out)
指定者:
接口 JSON.Convertor 中的 toJSON


Copyright © 2013. All Rights Reserved.