List of usage examples for org.springframework.integration.transformer MessageTransformationException MessageTransformationException
public MessageTransformationException(String description)
From source file:org.springframework.cloud.stream.app.gemfire.JsonObjectTransformer.java
public PdxInstance toObject(String json) { JSONObject jsonObject = null;/*from w w w . ja v a 2 s. c o m*/ try { jsonObject = new JSONObject(json); } catch (JSONException e) { throw new MessageTransformationException(e.getMessage()); } return JSONFormatter.fromJSON(jsonObject.toString()); }
From source file:org.springframework.integration.x.gemfire.JsonStringToObjectTransformer.java
public PdxInstance transform(String json) { JSONObject jsonObject = null;/*w w w . ja va 2 s . co m*/ try { jsonObject = new JSONObject(json); } catch (JSONException e) { throw new MessageTransformationException(e.getMessage()); } return JSONFormatter.fromJSON(jsonObject.toString()); }