cancel
Showing results for 
Search instead for 
Did you mean: 

how to process json request in webscript?

alex_lu
Champ in-the-making
Champ in-the-making
Hello,

I'm implementing a java back webscript that needs to process request that contains json collection. I haven't found any examples. Can anyone kindly point me a direction, please?

Thanks.
2 REPLIES 2

gyro_gearless
Champ in-the-making
Champ in-the-making
Just use the bundled JSON library - full documentation is at http://www.json.org/java/index.html

The objects you need most are JSONObject and JSONArray, which both can be simply constructed from any JSON formatted String 🙂

HTH
Gyro

alex_lu
Champ in-the-making
Champ in-the-making
The method that gets called in my webscript is

protected Map<String, Object> executeImpl(WebScriptRequest request,
         Status status, Cache cache) { }

I suppose the json request is wrapped in request?

Could you shed some lights on that, please? Thanks