AnsweredAssumed Answered

Create user with CUrl and JSON

Question asked by abarisone on Jun 5, 2014
Latest reply on Jun 9, 2014 by abarisone
Hi,
we are using a custom webscript similar to the /alfresco/service/api/people webscript in order to create users passing a JSON argument with CUrl:

curl -X POST -uadmin:admin http://localhost:8080/alfresco/service/api/people -H"content-type: application/json" -d@creaDOCADM.json

The problem is that if the JSON happens to be not well formed the script crashes with a stack without making us capable to catch any exception.
In fact, using the debugger, it seems that the check on the passed JSON is performed before entering the script.
Is it possible to intercept this error in order to preliminarly check the content of the passed JSON?

Regards,
Andrea

Outcomes