Answers for "string to jsonobject gson"

1

string to jsonobject gson

//use JsonParser; for example:
JsonObject o = JsonParser.parseString("{"a": "A"}").getAsJsonObject();
Posted by: Guest on December-23-2021
0

json to object gson

User user= gson.fromJson(jsonInString, User.class);

// where jsonInString is your json {"userId":"1","userName":"Yasir"}
Posted by: Guest on May-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language