JSON data load containing single quote loses the single quote when sent through curl, how to escape/keep single quotes

时间:2016-08-31 12:33:08

标签: json scala curl cassandra cql

I have this json data that I send to my system through curl and then query cassandra with it (parse to the where clause):

{"query": " name = 'Jane' "}

After receiving the data I need to extract the string value, namely " name = 'Jane' " but I always lose the single quotes inside. I tried escaping them with another single quote (as I've read in the datastax documentation), tried \ and \\ as escape symbols as well, neither worked. My language is Scala. Is there a way to salvage single quotes in JSON?

0 个答案:

没有答案
相关问题