Excluder excluder = Excluder.DEFAULT;
Map<Type, InstanceCreator<?>> instanceCreators = Collections.emptyMap();
ConstructorConstructor constructorConstructor = new ConstructorConstructor(instanceCreators);
gsonBuilder.registerTypeAdapterFactory(new NullableReflectiveTypeAdapterFactory(constructorConstructor,
fieldNamingStrategy, excluder));
gson = gsonBuilder.create();
}
return gson;