Live data from Hacker News

Jid – Drill down JSON data incrementally

github.com

11–20 of 55 posts

Re: Jid – Drill down JSON data incrementally

#12
post #5

The JSON crowd is re-inventing LISP. Originally, JSON was a subset of what you could pass to "eval()". Yesterday, state machine programming in JSON. Today, an inspector.

A new formulation of Greenspun's tenth rule, perhaps. [0]

[0]: https://en.wikipedia.org/wiki/Greenspun's_tenth_rule

Re: Jid – Drill down JSON data incrementally

#14
post #10
post #4

I personally like digging in a ruby console, e.g.: require 'json' require 'open-uri' data = JSON.load(open("https://api.github.com/users/Dorian")) data.keys data.first data["public_repos"] etc.

You personally like to suffer. I used to do that in Python, but it is a pain. jq is great for these things, and jid seems to be also.

I made a gui for this https://github.com/wellsjo/JSON-Splora

Re: Jid – Drill down JSON data incrementally

#15
post #10
post #4

I personally like digging in a ruby console, e.g.: require 'json' require 'open-uri' data = JSON.load(open("https://api.github.com/users/Dorian")) data.keys data.first data["public_repos"] etc.

You personally like to suffer. I used to do that in Python, but it is a pain. jq is great for these things, and jid seems to be also.

How would you do a `data.keys.sort` with jq? Here I don't have to learn a new programming language or hack around with UNIX pipes ;)

Re: Jid – Drill down JSON data incrementally

#17
post #15
post #10

Earlier quoted context omitted.

You personally like to suffer. I used to do that in Python, but it is a pain. jq is great for these things, and jid seems to be also.

How would you do a `data.keys.sort` with jq? Here I don't have to learn a new programming language or hack around with UNIX pipes ;)

`keys|sort` in jq.

Re: Jid – Drill down JSON data incrementally

#18
post #8
post #5

The JSON crowd is re-inventing LISP. Originally, JSON was a subset of what you could pass to "eval()". Yesterday, state machine programming in JSON. Today, an inspector.

Do you think that is bad? Many people like LISP.

I think Lisp folks complain because so much effort has been spent to converge on the same stuff we already had. When it comes to data serialization, over many decades we've invented many formats, and they usually go off on tangents and then converge on essentially the same stuff. Lispers respond: "We told you so."

Re: Jid – Drill down JSON data incrementally

#20
post #15
post #10

Earlier quoted context omitted.

You personally like to suffer. I used to do that in Python, but it is a pain. jq is great for these things, and jid seems to be also.

How would you do a `data.keys.sort` with jq? Here I don't have to learn a new programming language or hack around with UNIX pipes ;)

jq has sort and sort_by(exp). Its | is a jq operator, not a unix pipe.

It's true it's a new lang, and although simple, I often have to look things up.

It might be nice to have a jq REPL, so needn't quote, and easier to keep state around.

Post reply on HN