I want to store the current state of the page. For example, if there's a table in the page, I want to keep track of what page I'm in, what column I sorted ...
If that's all you're trying to do, then why not store the json using local storage and a randomly generated key, and just put the key into the url's fragment?
The URL has to be shareable. If I give the URL to someone else with your technique, he won't be able to see the same page.
Yeah, that's a valid point. Requirements matter :)