public interface ClassMapper extends ClassHelper
| Modifier and Type | Method and Description |
|---|---|
Object |
toJava(JSONMapper mapper,
JSONValue json,
Class<?> requestedClass)
Map an instance from the JSON model to Java.
|
JSONValue |
toJSON(JSONMapper mapper,
Object pojo)
Map a Java instance to an instance of the JSON model.
|
getHelpedClassObject toJava(JSONMapper mapper, JSONValue json, Class<?> requestedClass) throws MapperException
mapper - The JSONMapper is passed as an argument for recursive mappings or to access the mapping options.json - The JSON object that we want to convert.requestedClass - The target Java class in which we want to convert the JSON object.MapperException - If the mapping cannot be done.JSONValue toJSON(JSONMapper mapper, Object pojo) throws MapperException
mapper - The JSONMapper is passed as an argument for recursive mappings or to access the mapping options.pojo - The Java instance that we want to convert the JSON model.MapperException - If the mapping cannot be done.Copyright © 2012. All Rights Reserved.