How to read json sent by ajax in servlet

前端 未结 3 1503
栀梦
栀梦 2020-12-02 23:11

I\'m new to java and I struggling with this problem for 2 days and finally decided to ask here.

I am trying to read data sent by jQuery so i can use it in my servlet

3条回答
  •  渐次进展
    2020-12-02 23:59

    Using the import org.json.JSONObject instead of import org.json.simple.JSONObject did the trick for me.

    See How to create Json object from String containing characters like ':' ,'[' and ']' in Java.

提交回复
热议问题