You could use a different name for your field, using gson’s Field Naming Support.
public class Post {
@SerializedName("public")
private boolean isPublic;
...
}
More Related Contents:
- What does ‘synchronized’ mean?
- GSON throwing “Expected BEGIN_OBJECT but was BEGIN_ARRAY”?
- Deserialize a List object with Gson?
- What is the “continue” keyword and how does it work in Java?
- gson throws MalformedJsonException
- Gson – convert from Json to a typed ArrayList
- Using the keyword “this” in java [duplicate]
- Parse JSON file using GSON
- How to prevent Gson from expressing integers as floats
- Difference between “this” and”super” keywords in Java
- Query a JSONObject in java
- How to deserialize a list using GSON or another JSON library in Java?
- Deserializing Generic Types with GSON
- How to prevent Gson from converting a long number (a json string ) to scientific notation format?
- What is the equivalent of the C# ‘var’ keyword in Java?
- 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
- Android: Realm + Retrofit 2 + Gson
- Gson: Is there an easier way to serialize a map
- Jsonpath with Jackson or Gson
- 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?
- How to convert JSONArray to List with Gson?
- Using gson to deserialize specific JSON field of an object
- Why use the `transient` keyword in java? [duplicate]
- GSON is not being imported into the maven project