The current JSON adaptor implementation, the property name or %JSONFIELDNAME is treated as a constant and case-sensitive when importing JSON into an object. This means the JSON key must match exactly or match with the xData Mapping.
To improve flexibility, introduce a new parameter, %JSONFIELDCASE, which allows developers to override this default behavior and perform case-insensitive mapping during import.
Example:
Property Name As %String(%JSONFIELDCASE = 0);
This property would accept any of the following JSON keys: "Name", "name", "nAMe", etc.
Property Description As %String;
This would only map successfully to the exact key "Description" in the JSON.
This enhancement would help reduce JSON parsing errors and support more flexible integrations.
Thank you for submitting the idea. Based on information from our experts the status of your idea was changed to "Will not implement". Please look for details in the comments on the idea. Good luck!
In addition, if no %JSONFIELDNAME is provided, allow Case-insensitive behaviour for data import. It is really strange that now import is Case-sensitive, as class properties are not Case-sensitive by its nature.