Show HN: json-anything
github.com
Show HN: json-anything
1–8 of 8 posts
Re: Show HN: json-anything
#2Note 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.
Re: Show HN: json-anything
#3Read 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.
Re: Show HN: json-anything
#4Read 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.
Re: Show HN: json-anything
#5Earlier quoted context omitted.
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.
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.Re: Show HN: json-anything
#6Earlier quoted context omitted.
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.
Re: Show HN: json-anything
#7Re: Show HN: json-anything
#8Interesting project but what's the advantage of using this over YQL?
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.