You need to sign in to do that
Don't have an account?
ryanhca123
Integration to REST API requires use of reserved words
I'm writing an integration to a REST API that takes JSON as the API input. Several of the objects have properties like "number" and "currency" which are reserved words in Apex. So I've renamed those as "card_number", etc. I want to translate the Apex objects to JSON objects, which will create JSON objects with properties that don't correspond exactly with the API.
Is there a better way to fix the resulting JSON other than just doing string manipulation after the fact?
I too am having this problem ... using a predeveloped javascript toolset where I cannot change the name of properties, etc. Can I use attribute programming or similar to ensure the attribute is mapped when serialized/deserialized?
Did you find a solution here?