Hacker News new | ask | show | jobs
by hashberry 4104 days ago
JSON in URL: /log?%7B%22a%22:%22b%22,%22c%22:4%7D

You are debugging and need to quickly identify the values you are passing to the API. Better have a JSON parser handy.

1 comments

This is already a problem if you ever have to work with non-ASCII characters. Check out a URL to a page in the Japanese Wikipedia, for instance.
Ahh but that is not the value that is sent to the webserver, that is just your web browser prettying up the display. If we open the inspector and see what was sent we have:

Request URL:https://ja.wikipedia.org/wiki/%E3%83%99%E3%83%BC%E3%82%AB%E3...

Your browser will equally pretty up the json in the url for display purposes.