Package org.eclipse.jetty.util.ajax
Class JSONObjectConvertor
java.lang.Object
org.eclipse.jetty.util.ajax.JSONObjectConvertor
- All Implemented Interfaces:
JSON.Convertor
Converts an Object to JSON using reflection on getters methods.
-
Constructor Summary
ConstructorDescriptionJSONObjectConvertor
(boolean fromJSON) JSONObjectConvertor
(boolean fromJSON, String[] excludedFieldNames) -
Method Summary
-
Constructor Details
-
JSONObjectConvertor
public JSONObjectConvertor() -
JSONObjectConvertor
public JSONObjectConvertor(boolean fromJSON) -
JSONObjectConvertor
- Parameters:
fromJSON
- true to convert from JSONexcludedFieldNames
- An array of field names to exclude from the conversion
-
-
Method Details
-
fromJSON
- Specified by:
fromJSON
in interfaceJSON.Convertor
-
toJSON
- Specified by:
toJSON
in interfaceJSON.Convertor
-
includeField
-