Live data from Hacker News

Json.human.js: Json Formatting for Human Beings

marianoguerra.github.io

31–40 of 71 posts

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

#31

This is awesome. It's funny, I didn't think it would be useful until I actually checked it out, because I personally find JSON to be fairly readable.

I actually think the source example on that page is far more readable than the HTML formatted output.

Maybe I'm not human. Captchas have been telling me this for a while.

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

#32

Earlier quoted context omitted.

since css classes tell you what's inside you can recover it completely, also I was thinking on using HTML5's data- to store the data there too. the next next step would be to provide in place edition with validation :)

the next next step would be to provide in place edition with validation :) Definitely! Take a look at http://createjs.org/--it will probably help (in fact, I've been using it for a different project and if I have time I might be submitting a pull request to you in the next week or so).

that would be cool, let's track it here: https://github.com/marianoguerra/json.human.js/issues/7

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

#35
post #27

Earlier quoted context omitted.

thanks! fixed and pushed, should update in some minutes.

Also to/too in "to technical"

thanks, fixed and pushed.

HN is like a free proof reader as a service :P

when two words have similar pronunciation I may write the wrong one.

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

#37
post #26

Pretty funny considering JSON is self described as "easy for humans to read and write." If your target is nontechnical folks, I wonder if it would be useful to go a step further and: - Remove quotes from strings. They're already formatted differently. - Remove array indices. - Unescape strings. The context and formatting should still be enough for devs, but I can't imagine quotes or indices do anything for nontechnic…

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…

[deleted]

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

#38
post #26

Pretty funny considering JSON is self described as "easy for humans to read and write." If your target is nontechnical folks, I wonder if it would be useful to go a step further and: - Remove quotes from strings. They're already formatted differently. - Remove array indices. - Unescape strings. The context and formatting should still be enough for devs, but I can't imagine quotes or indices do anything for nontechnic…

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…

Re: list styling - you can make the whole list a different colour and also "extract" it with different borders. Consider indenting items more visibly - either more leading space or a more visual left border (e.g. something that looks like [ or { )

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

#40
post #26

Pretty funny considering JSON is self described as "easy for humans to read and write." If your target is nontechnical folks, I wonder if it would be useful to go a step further and: - Remove quotes from strings. They're already formatted differently. - Remove array indices. - Unescape strings. The context and formatting should still be enough for devs, but I can't imagine quotes or indices do anything for nontechnic…

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 each array value that mimics a list?

Post reply on HN