5 ms·
Show HN: json-anything
- mooism2 15y agoRead up on http://en.wikipedia.org/wiki/Url_encoding http://en.wikipedia.org/wiki/Url_encoding -- surely php has built in functions to handle this. Note that `#` should be encoded as `%23` and that your suggestion of encoding it as `%` results in invalid urls. Also this means e.g. search result page urls can be passed without resorting to POST.
- keyle 15y agoThanks, but the point was to be able to do it all as GET. Support for POST only became a necessity trying to parse some search engines with parameters in the url.
- mooism2 15y agoYes, you encode `&` as `%26`, `=` as `%3d`, `?` as `%3f` etc. You only need to resort to POST if you would hit length limits with your constructed url.
- keyle 15y agoThanks again, I see your point, but this would make the syntax absolutely obscure. The idea is to keep it simple, to just call ?url=theurl&sel=.simple_stuff I will look at using something else than % as you suggested.
- mooism2 15y agoIt doesn't make the syntax obscure, it makes the syntax standard. Your syntax, being ad hoc, is obscure.
- mil 15y agoInteresting project but what's the advantage of using this over YQL?
- keyle 15y agoI wasn't familiar with that use of YQL. Thanks. It's a shotgun api, within 5min I can get any site just by calling a url, using jquery-type selectors. I think that's pretty cool. No sql-like syntax.