Quantcast
Channel: Active questions tagged bash+awk - Ask Ubuntu
Viewing all articles
Browse latest Browse all 102

Change the cURL response encoding for some characters

$
0
0

The response of the below curl command is a json and it has some japanese characters which it is showing in utf-8. I can't share the url but this is how I am sending the request.

curl https://some-url --header "Content-Type:application/json" --data '{"key":"value"}'

The response is:

{"Name" : "\u6545\u90f7\u306e\u5bb6","id" : 5}

But when I pipe the respone to json_pp it is working fine and showing the japanese characters. The issue is for some reasons I don't want to use json_pp. Is there any alternative which can work without installing some external library and work for Mac / Linux and windows machine capable of running shell commands.


Viewing all articles
Browse latest Browse all 102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>