I am working on an Apex Rest Resource to provide an integration from our scm provider's web hooks. The request sent by the scm provider is in JSON format so I have created an Apex class to mirror that object structure.
The problem I am running into is that the request contains a property named
commit is a reserved keyword in apex, I cannot create a property with this name. If I had any control over the deserialization I could use
commit_x with a replace beforehand. However, I have no control over the deserialization from an apex @ResetResource class.
How can I handle the reserved keyword
commit in the request? Apex must have some mechanism for this otherwise it would mean that you can never create a rest api for any service that uses a reserved keyword in its data, which would be absurd.