Java Gson exclude fields with modifiers
In this tutorial we learn how to configure Gson to exclude fields during serialization or deserialize JSON to exclude fields with specific access modifiers. Via step by step example we will show you how to use the GsonBuilder.excludeFieldsWithModifiers() method to override Gson configuration to exclude fields by given modifiers.