
Show HN: json-anything - keyle
https://github.com/keyle/json-anything/
======
mooism2
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.

~~~
keyle
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.

~~~
mooism2
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.

~~~
keyle
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.

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

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

~~~
keyle
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.

