Package org.eclipse.jetty.util.ajax
Class JSONPojoConvertorFactory
- java.lang.Object
-
- org.eclipse.jetty.util.ajax.JSONPojoConvertorFactory
-
- All Implemented Interfaces:
JSON.Convertor
public class JSONPojoConvertorFactory extends java.lang.Object implements JSON.Convertor
-
-
Constructor Summary
Constructors Constructor Description JSONPojoConvertorFactory(JSON json)
JSONPojoConvertorFactory(JSON json, boolean fromJSON)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
fromJSON(java.util.Map object)
void
toJSON(java.lang.Object obj, JSON.Output out)
-
-
-
Constructor Detail
-
JSONPojoConvertorFactory
public JSONPojoConvertorFactory(JSON json)
-
JSONPojoConvertorFactory
public JSONPojoConvertorFactory(JSON json, boolean fromJSON)
- Parameters:
json
- The JSON instance to usefromJSON
- If true, the class name of the objects is included in the generated JSON and is used to instantiate the object when JSON is parsed (otherwise a Map is used).
-
-
Method Detail
-
toJSON
public void toJSON(java.lang.Object obj, JSON.Output out)
- Specified by:
toJSON
in interfaceJSON.Convertor
-
fromJSON
public java.lang.Object fromJSON(java.util.Map object)
- Specified by:
fromJSON
in interfaceJSON.Convertor
-
-