Skip to content

Instantly share code, notes, and snippets.

@hpmohan
Created July 7, 2025 09:24
Show Gist options
  • Save hpmohan/eb64202826532624895d058f1d358ee2 to your computer and use it in GitHub Desktop.
Save hpmohan/eb64202826532624895d058f1d358ee2 to your computer and use it in GitHub Desktop.
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