Interface ModelJsonTransformer
- All Superinterfaces:
JsonTransformer
,Transformer
- All Known Implementing Classes:
ModelJsonCsvTransformer
public interface ModelJsonTransformer extends JsonTransformer
Interface to be implemented by clients who wish to transform a List of
models to JSON objects.
-
Method Summary
Modifier and Type Method Description void
transform(Model model, org.json.JSONObject json, JsonTransformerContext context)
Converts a model to json.
-
Method Details
-
transform
void transform(Model model, org.json.JSONObject json, JsonTransformerContext context) throws JsonTransformExceptionConverts a model to json. This method is invoked inJSONService.jsonToModel(JSONObject, Class, String, String, com.onenetwork.platform.common.usercontext.PlatformUserProfile...)
- Parameters:
model
- model to be transformedjson
- default JSON representation - can be further modified by the transformcontext
- additional context information relevant to the current transform- Throws:
JsonTransformException
- thrown to abort the transform
-