curl - How to escape single quotes into double quotes into single quotes -


here example of command line fit description :

curl http://dumbdomain.com/solr/collection2/update/json -h 'content-type:application/json' -d ' { "add": { "doc": { "uid": "79729", "text" : "i''ve got number"} } }'

i tried \' (not escaped), url encoded (not urldecoded @ other end!) , '' (quote disappear!), without success.

if replace ' unicode encoded ' (which \u0027), works:

curl http://dumbdomain.com/solr/collection2/update/json -h 'content-type:application/json' -d ' { "add": { "doc": { "uid": "79729", "text" : "i\u0027ve got number"} } }' 

strange, worth know!


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -