This content has been marked as final. Show 22 replies
It's not possible to disable this functionality in 1.1.x, to be honest I did not expect anyone to be prepared to go to the trouble of parsing complex JSON in PL/SQL, I will investigate the feasibility of changing the behaviour in 2.0 so that it does not refuse the request if it cannot parse as simple name value pairs, instead just passing the payload as :body instead.
I read your thread and have setup the case 'json_demo' in an Apex 4.2/ Listener 2.0 environment.
When I submit the POST (using the firefox RESTclient, thanks Frédéric!) with the json structure, the Status Code: 200 OK, but it doesn't bind the variables (it insert two Null values!).
I also tried to setup IN parameters for :title,:description, but no success.
I must be missing something here..
Your help is much appreciated..
Thanks for your fast reply. This is the testcase:
resource module uri prefix: json/
resource template uri pattern: post/
source Type: PL/SQL
insert into <MySchema>.json_demo values(:title,:description);
Note: <MySchema> = my schema name
Let me know if you need more information.
it seems the problem pointed out by Joost still exists in 2.0 (I get the "Expected a value but got: START_OBJECT" error when trying to use the :body parameter on a json object containing arrays etc.). The automatic parsing of simple json objects introduced in 1.1. is great, but the fact that no other types of json objects are parsable with the current implementation is a pretty serious limitation in my opinion. Parsing json objects manually isn't all that difficult if you use PL/JSON, and it would be truly great if this was possible.