6 ms·
As neat as this sounds, I would prefer to do a little extra parsing by hand in exchange for the readability of JSON. Looking at some of Transit's examples, it s
by iheart2code 12y ago
As neat as this sounds, I would prefer to do a little extra parsing by hand in exchange for the readability of JSON. Looking at some of Transit's examples, it seems like it would be difficult to gain as complete an understanding of a set of information at a glance.
- fogus 12y agoTransit does specify a json-verbose mode that generates a human-readable JSON packet. I suppose readability lies in the eye of the beholder, but I think it looks reasonable.
- swannodette 12y agoAll JSON based Transit reader and writers can respectively read and emit verbose output. You can easily imagine setting a dev configuration flag to enable this during development. Transit verbose JSON output is quite readable IMO - http://cognitect.github.io/transit-tour/resources/example.json http://cognitect.github.io/transit-tour/resources/example.js...
- logicallee 12y agoIf it's programmatically self-describing, nobody ever has to read it. EDIT: I mean as opposed to something like json that has what the authors describe as out-of-band schema.
- bellerocky 12y agoYou have to read it when you want to look at what is going over the wire. Like with Wireshark or just inspecting network traffic.
- iheart2code 12y agoThis is exactly what I was thinking. Also, when inheriting projects from other developers that didn't produce documentation.
- rdtsc 12y agoJSON is readable in small quantities. A 100MB JSON file is just as readable as a 100MB binary file, except it is slower and bigger to parse. Also unless you can see electrons bouncing on the wire, JSON is readable because there is a program that decodes and shows it to you. It would probably take a couple of lines of code in python to cat a msgpack file.
- icebraining 12y agoDisplaying files is not the only way to read JSON. I've often read it on the browser development tools, on Wireshark, on tcpdump, etc.
- zenbowman 12y agoIn most cases, readability is not a concern for inter-program messaging. A good logging system in your program should take care of the readability concerns. I've never come across a single instance of a text format for interprogram messaging not having to be rewritten in a binary format once it becomes obvious that it is a huge waste of computing resources. As Alan Kay suggested, it the total and deliberate ignorance of lessons learned from our history that has made modern programming into a pop-culture phenomenon.