function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Adelchi PelizzoAdelchi Pelizzo 

Rest HttpPost JSON

 
I need my Apex Rest method HttpPost, to consume a json object where the first name-value pair is:
 
{
"string with spaces" : "string_without_spaces",
... }


 
If I set parameter as a generic Object, I am getting : "Post methods do not support parameter type of Object" 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Adelchi,

>> https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_json_jsonparser.htm

In the above documentation link, there is an example of a parsing JSON that you can use in your use case as per your implementation.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.