Skip to content

Instantly share code, notes, and snippets.

@nickname55
Created January 29, 2018 11:06
Show Gist options
  • Save nickname55/21130765a78ffeedaee9611a95f4f256 to your computer and use it in GitHub Desktop.
Save nickname55/21130765a78ffeedaee9611a95f4f256 to your computer and use it in GitHub Desktop.
подключение пользовательноского десериализера и стратегии исключений
//создаем gson-билдер
Gson gson = new GsonBuilder()
.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
.disableHtmlEscaping()
.addDeserializationExclusionStrategy(new MyExclusionStrategy())
.registerTypeAdapter(new TypeToken<Object>(){}.getType(), new MyDeserializer<Object>())
.create();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment