I have some JSON coming in that's like this (data removed for privacy reasons.
{"user":{"id":"","email":"","first_name":"","last_name":""}, "STUFF I DONT WANT HERE"}
I wrote an inner wrapper class for it like this:
public with sharing class WrapperUserJson {
public String id;
public String email;
public String first_name;
public String last_name;
}
In a method I am doing something like
WrapperUserJson data = (WrapperUserJson)JSON.deserialize(st, WrapperUserJson.class);
But it always returns null. I know for a fact that the JSON is being passed to it so I don't get it. What am I missing?