3 ms·
In cases where I really need to have data structures in URLs, I rather like Rison: http://mjtemplate.org/examples/rison.html http://mjtemplate.org/examples/riso
by stdbrouw 15y ago
In cases where I really need to have data structures in URLs, I rather like Rison: http://mjtemplate.org/examples/rison.html http://mjtemplate.org/examples/rison.html which has existed for quite some time now and has parsers/generators in Python (https://github.com/stdbrouw/python-rison https://github.com/stdbrouw/python-rison), Ruby and JavaScript.
- vjeux 15y agoThanks! I didn't know about Rison, it is trying to solve the same issue :) Edit: I've added Rison to the list of translations in the article. It is far more readable than URLON but I find that it doesn't feel like it's a part of an url.
- skrebbel 15y ago> It is far more readable than URLON but I find that it doesn't feel like it's a part of an url. Should it?
- stdbrouw 15y agoIf you know what kind of structure each argument will have, the variants O-Rison and A-Rison further cut down on the parentheses. For example: http://example.com/service?query=q:'*',start:10,count:10&pretty=false Looks pretty natural to me.