Live data from Hacker News

Json.human.js: Json Formatting for Human Beings

marianoguerra.github.io

41–50 of 71 posts

Re: Json.human.js: Json Formatting for Human Beings

#42
post #40

Earlier quoted context omitted.

about removing quotes from strings, I tought about it, and I think as long as some other display property is different (to differentiate the number 4 from the string "4") and something more than color to avoid causing trouble to colorblind people I think it's a good idea. the array indices I was thinking on having it as an option, I would like 'something' to make them standout as lists even when no index is displayed…

Thanks for the quick response. I guess I should have opened issues myself, but I have some irrational fear about using github features. >something more than color to avoid causing trouble to colorblind people I think it's a good idea. I think what you have is decent. Bold for numbers. Italics for literals. Making arrays stand out is tough. Perhaps you could do some zebra striping on arrays. Or use bullets outside of…

someone in the comments here said that zebra stripes are a bad practice and linked to some resources about that, so guess zebra stripes won't do (I'm also using them for objects, so they won't stand out as lists but as collections of things together with objects)

someone pointed out on an issue that empty lists and empty objects can't be differentiated, so a solution that handles both would be cool.

question: why the github fear? :)

Re: Json.human.js: Json Formatting for Human Beings

#44
I've been using a library called prettyprint.js for quite some time that basically does the same thing but a bit prettier and from what I remember is basically a port of sorts of Coldfusion's cfdump: https://github.com/padolsey/prettyPrint.js

I've used this library recently to help the QA's better understand a JSON API's output.

Re: Json.human.js: Json Formatting for Human Beings

#45
post #40

Earlier quoted context omitted.

Thanks for the quick response. I guess I should have opened issues myself, but I have some irrational fear about using github features. >something more than color to avoid causing trouble to colorblind people I think it's a good idea. I think what you have is decent. Bold for numbers. Italics for literals. Making arrays stand out is tough. Perhaps you could do some zebra striping on arrays. Or use bullets outside of…

someone in the comments here said that zebra stripes are a bad practice and linked to some resources about that, so guess zebra stripes won't do (I'm also using them for objects, so they won't stand out as lists but as collections of things together with objects) someone pointed out on an issue that empty lists and empty objects can't be differentiated, so a solution that handles both would be cool. question: why the…

Without derailing this thread, tldr: social anxiety around contributing to OSS. That sounds pretty dumb I know.

Re: Json.human.js: Json Formatting for Human Beings

#47

I use http://james.padolsey.com/javascript/prettyprint-for-javascr... at work in a debugging interface for AJAX requests. Sometimes having JSON pretty-printed in the sidebar is more convenient than clicking on it to expand it in the console.

nice, I didn't found it this morning when looking for it, maybe since it says prettyprint for javascript it didn't rank high on the search results for my query.

Re: Json.human.js: Json Formatting for Human Beings

#49
post #15

I really enjoy JSONView for solving this problem. Chrome extension: https://chrome.google.com/webstore/detail/jsonview/chklaanhf... Original firefox extension: http://benhollis.net/software/jsonview/

Ditto. Between the indentation, colorization, and tree collapsing, I don't need much more from a JSON viewer.

Re: Json.human.js: Json Formatting for Human Beings

#50

You know, it's funny but I find the pretty-printed JSON easier to read than the formatted HTML.

I agree. The "code" in the example page is, to me, easier to understand than the "human-readable" output.

For me, it's about spacing efficiency (I can see more at once), formatting (e.g., italic is not as easy to read as roman faces), and color (green on grey? huh?).

But I've always been a fan of plain-text in general. I'd much rather use plain-text markdown than MS Word, or edit code in plain files as opposed to an IDE. Plain text, to me, is much more WYSIWIG than any GUI tool I've used. But I understand that not everyone thinks the same way.

Post reply on HN