I think the return value from facebook is ambiguous.:
loginButton.registerCallback(callbackManager, new FacebookCallback() {
@Over
What about using google gson? https://github.com/google/gson
I use it for every Android project where I need to serialize/deserialize json. Give it a try, here are some basic examples for you which should satisfy your needs:
Deserialization:
int one = gson.fromJson("1", int.class);
Integer one = gson.fromJson("1", Integer.class);
Long one = gson.fromJson("1", Long.class);
Boolean false = gson.fromJson("false", Boolean.class);
String str = gson.fromJson("\"abc\"", String.class);
String anotherStr = gson.fromJson("[\"abc\"]", String.class);
If not, check the documentation here: https://sites.google.com/site/gson/gson-user-guide