Created
July 7, 2025 09:24
-
-
Save hpmohan/eb64202826532624895d058f1d358ee2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public class CustomDeserializer { | |
| public class ResponseWrapper { | |
| public Integer defaultValue; // Reserved keyword mapping | |
| // Add other properties here | |
| } | |
| public static ResponseWrapper deserializeResponse(String jsonString) { | |
| Map<String, Object> jsonMap = (Map<String, Object>) JSON.deserializeUntyped(jsonString); | |
| ResponseWrapper wrapper = new ResponseWrapper(); | |
| wrapper.defaultValue = (Integer) jsonMap.get('default'); | |
| // Add other property mappings here | |
| return wrapper; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment