4 ms·
You can translate the base64 version into a readable form from the terminal using widely available libraries. For example, using a Python interpreter you can d
by sethg 15y ago
You can translate the base64 version into a readable form from the terminal using widely available libraries. For example, using a Python interpreter you can do this:
>>> from base64 import b64decode
>>> from json import loads, dumps
>>> print dumps(loads(b64decode('eyJ1c2VyIjp7Im5hbWUiOiJCb2IgU21pdGgiLCJhZ2UiOjQ3LCJzZXgiOiJNIiwiZG9iIjoiNS0xMi0xOTU2In0sInBhc3RpbWVzIjoNClsiZ29sZiIsIm9wZXJhIiwicG9rZXIiLCJyYXAiXSwiY2hpbGRyZW4iOnsiYm9iYnkiOnsiYWdlIjoxMiwic2V4IjoiTSJ9LA0KInNhbGx5Ijp7ImFnZSI6OCwic2V4IjoiRiJ9fX0=')), indent=2)
{
"pastimes": [
"golf",
"opera",
"poker",
"rap"
],
## [etc.]
}
- vjeux 15y agoThe goal is to use it in a URL. I don't want my urls to look like that: http://db.mmo-champion.com/items/#eyJ1c2VyIjp7Im5hbWUiO iJCb2IgU21pdGgiLCJhZ2UiOjQ3LCJzZXgiOiJNIiwiZG9iIjoiNS0x Mi0xOTU2In0sInBhc3RpbWVzIjoNClsiZ29sZiIsIm9wZXJhIiwicG9 rZXIiLCJyYXAiXSwiY2hpbGRyZW4iOnsiYm9iYnkiOnsiYWdlIjoxMi wic2V4IjoiTSJ9LA0KInNhbGx5Ijp7ImFnZSI6OCwic2V4IjoiRiJ9f X0
- sethg 15y agoIf you want to pack that much information into a URL, it’s going to look ugly no matter how it’s formatted. (I assume you have some reason for not just passing a session key in the URL and keeping all the relevant state on the server.)