Created
January 29, 2018 11:06
-
-
Save nickname55/21130765a78ffeedaee9611a95f4f256 to your computer and use it in GitHub Desktop.
подключение пользовательноского десериализера и стратегии исключений
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//создаем 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