Note that JsonHttpContent class from com.google.http-client/google-http-client-gson does not support the full feature set of Gson library.
Instead it just relies on the JsonParser provided by Gson.
Code snippet below provides a bridge between full featured Gson/GsonBuilder and Google HTTP Client.
See https://stackoverflow.com/questions/34690059/configuring-the-gsonfactory-of-google-http-client