Converts POJOs to JSON and vice versa.
The key differences with respect to JSONObjectConvertor are:
| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | |
| protected Set | |
| protected boolean | |
| protected Map | |
| protected Class | |
| protected Map | |
| private static final JSONPojoConvertor. | |
| private static final JSONPojoConvertor. | |
| private static final JSONPojoConvertor. | |
| private static final Logger | |
| private static final JSONPojoConvertor. | |
| private static final JSONPojoConvertor. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JSONPojoConvertor(Class<?>
The class to convert pojoClass, boolean If true, add a class field to the JSON fromJSON)
|
| public | |
| public | JSONPojoConvertor(Class<?>
The class to convert pojoClass, Set<String> The fields to exclude excluded)
|
| public | JSONPojoConvertor(Class<?>
The class to convert pojoClass, Set<String> The fields to exclude excluded, boolean If true, add a class field to the JSON fromJSON)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| public Object | |
| public static JSONPojoConvertor. | |
| protected JSONPojoConvertor. | |
| protected boolean | |
| protected void | |
| private void | |
| public void |
| __numberTypes | back to summary |
|---|---|
| private static final Map<Class<?>, JSONPojoConvertor. | |
| _excluded | back to summary |
|---|---|
| protected Set<String> _excluded | |
| _fromJSON | back to summary |
|---|---|
| protected boolean _fromJSON | |
| _getters | back to summary |
|---|---|
| protected Map<String, Method> _getters | |
| _pojoClass | back to summary |
|---|---|
| protected Class<?> _pojoClass | |
| _setters | back to summary |
|---|---|
| protected Map<String, JSONPojoConvertor. | |
| DOUBLE | back to summary |
|---|---|
| private static final JSONPojoConvertor. | |
| FLOAT | back to summary |
|---|---|
| private static final JSONPojoConvertor. | |
| INTEGER | back to summary |
|---|---|
| private static final JSONPojoConvertor. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| LONG | back to summary |
|---|---|
| private static final JSONPojoConvertor. | |
| SHORT | back to summary |
|---|---|
| private static final JSONPojoConvertor. | |
| JSONPojoConvertor | back to summary |
|---|---|
public JSONPojoConvertor(Class<?> pojoClass)
| |
| JSONPojoConvertor | back to summary |
|---|---|
public JSONPojoConvertor(Class<?> pojoClass, boolean fromJSON)
| |
| JSONPojoConvertor | back to summary |
|---|---|
| public JSONPojoConvertor(Class<?> pojoClass, String[] excluded) | |
| JSONPojoConvertor | back to summary |
|---|---|
| public JSONPojoConvertor(Class<?> pojoClass, Set<String> excluded) | |
| JSONPojoConvertor | back to summary |
|---|---|
| public JSONPojoConvertor(Class<?> pojoClass, Set<String> excluded, boolean fromJSON) | |
| addGetter | back to summary |
|---|---|
| protected void addGetter(String name, Method method) | |
| addSetter | back to summary |
|---|---|
| protected void addSetter(String name, Method method) | |
| fromJSON | back to summary |
|---|---|
| public Object fromJSON(Map<String, Object> object) Implements org.
| |
| getNumberType | back to summary |
|---|---|
| public static JSONPojoConvertor. | |
| getSetter | back to summary |
|---|---|
| protected JSONPojoConvertor. | |
| includeField | back to summary |
|---|---|
| protected boolean includeField(String name, Method m) | |
| init | back to summary |
|---|---|
| protected void init() | |
| setProps | back to summary |
|---|---|
| private void setProps(Object obj, Map<String, Object> props) | |
| toJSON | back to summary |
|---|---|
| public void toJSON(Object obj, JSON. Implements org.
| |
| Modifier and Type | Method and Description |
|---|---|
| public Object |
| getActualValue | back to summary |
|---|---|
| public Object getActualValue(Number number) | |
| Modifier and Type | Field and Description |
|---|---|
| protected Class | |
| protected JSONPojoConvertor. | |
| protected String | |
| protected Method | |
| protected Class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Class | |
| public Method | |
| public JSONPojoConvertor. | |
| public String | |
| public Class | |
| public void | |
| protected void | |
| public boolean |
| _componentType | back to summary |
|---|---|
| protected Class<?> _componentType | |
| _numberType | back to summary |
|---|---|
| protected JSONPojoConvertor. | |
| _propertyName | back to summary |
|---|---|
| protected String _propertyName | |
| _setter | back to summary |
|---|---|
| protected Method _setter | |
| _type | back to summary |
|---|---|
| protected Class<?> _type | |
| Setter | back to summary |
|---|---|
| public Setter(String propertyName, Method method) | |
| getComponentType | back to summary |
|---|---|
| public Class | |
| getMethod | back to summary |
|---|---|
| public Method getMethod() | |
| getNumberType | back to summary |
|---|---|
| public JSONPojoConvertor. | |
| getPropertyName | back to summary |
|---|---|
| public String getPropertyName() | |
| getType | back to summary |
|---|---|
| public Class | |
| invoke | back to summary |
|---|---|
| public void invoke(Object obj, Object value) throws Exception | |
| invokeObject | back to summary |
|---|---|
| protected void invokeObject(Object obj, Object value) throws Exception | |
| isPropertyNumber | back to summary |
|---|---|
| public boolean isPropertyNumber() | |