I have a wrapper class and we are deserializing the JSON data, and now we have to send that wrapper class to another method which is in another class.
- How we have to send it as a parameter?
- How to access it in another class?
This is what our approach till now.
JSONWrapper mapRequest1 = (JSONWrapper) JSON.deserialize(request.requestBody.toString(),JSONWrapper.class);
JSONWrapper --- Name of the Wrapper class
request --- Contains Json data
mapRequest1 --- Contains Deserialized data