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, any idea?
will open issues for both:
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, any idea?
will open issues for both:
The problem is that for most people the technical and subtle difference between 4 and "4" does not have any meaning except that "the system" apparently differentiates for some reason. Subsequently they will (implicitly) attach some meaning to the difference, but, as they don't have a background in information, their understanding probably does not correspond with the reasons why you implemented this difference. For example, they could think that "4" means "about four", or "four is important", or "four", or whatever.
Unless the difference between "4" and 4 is or becomes relevant to the user, the user should be prevented to have to differentiate between the two. And "because the system asks for it" doesn't really make it relevant to most users.
I do understand the problem, of course. Without some function attaching meaning to the JSON fields, a program cannot know if a 4 has to be 4 or "4". That means you have to make a rule one way or the other. The question you should ask yourself is: which one is best in your situation given the audience you target. Possible rules:
- a numerical number on its own, however written, is interpreted as 4 instead of "4". So, "4", " 4", 4, " 4 " will all be interpreted as 4. - all primitive fields are all strings. The program has to attach meaning to them. So, 4, "4", " 4", are all "4" - there is a difference between "4" and 4. If you want the number, use 4, if you want the text four written in numericals, use "4".
>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?
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? :)