use JsonParser; for example:
JsonObject o = JsonParser.parseString("{\"a\": \"A\"}").getAsJsonObject();
More Related Contents:
- Deserialize a List object with Gson?
- JAVA – Best approach to parse huge (extra large) JSON file
- How to Parse JSON Array with Gson
- gson throws MalformedJsonException
- How to parse JSON Array (Not Json Object) in Android
- Gson – convert from Json to a typed ArrayList
- Parse JSON file using GSON
- gson.toJson() throws StackOverflowError
- Query a JSONObject in java
- How to deserialize a list using GSON or another JSON library in Java?
- Trouble with Gson serializing an ArrayList of POJO’s
- Converting json string to java object?
- Gson Serialize field only if not null or not empty
- Make GSON accept single objects where it expects arrays
- How to convert a String to JsonObject using gson library
- Remove empty collections from a JSON with Gson
- How do I implement TypeAdapterFactory in Gson?
- Parsing nested JSON data using GSON
- Gson: Is there an easier way to serialize a map
- Jsonpath with Jackson or Gson
- Can you avoid Gson converting “” into unicode escape sequences?
- com.google.gson.internal.LinkedTreeMap cannot be cast to my class [duplicate]
- How to keep fields sequence in Gson serialization
- Java – Gson parsing nested within nested
- GSON: How to get a case insensitive element from Json?
- Using gson to deserialize specific JSON field of an object
- Gson custom deseralizer for one variable in an object
- How to serialize Optional classes with Gson?
- Retrofit GSON serialize Date from json string into java.util.date
- How to handle a NumberFormatException with Gson in deserialization a JSON response