Gson by design is a lenient parser. If you need to fail on unknown fields, you need to write a custom JsonDeserializer or TypeAdapter for each class where you need strict parsing.
Alternatively, you can write a TypeAdapterFactory that does this for a set of classes that you care about.
HTH
Inder