Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: json-anything (github.com/keyle)
4 points by keyle on July 24, 2011 | hide | past | favorite | 7 comments


Read up on 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.


Thanks, 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.


Yes, 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.


Thanks 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.


It doesn't make the syntax obscure, it makes the syntax standard. Your syntax, being ad hoc, is obscure.


Interesting project but what's the advantage of using this over YQL?


I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: