3 ms·
The problem is that people use spaces and not TABs here. The TABualator key was invented for this purpose, in the age of the typewriter, to make things visuall
by teytra 3y ago
The problem is that people use spaces and not TABs here.
The TABualator key was invented for this purpose, in the age of the typewriter, to make things visually stand out by grouping it in the same column of a table. So all the lines that belong together are listed with the same indent, (originally all items belonging in the same column being listed under the same heading).
Example
user:
given_name: something
family_name: somenting
Using a somewhat randomly number of spaces is just silly, the two name lines is one hierarcical level below "user" so add one tab char to represent that fact.
Then you can vary the visual representation in your editor to your liking.
json is created to make it easy for machines to parse, not humans. Leave it to the machines.
Actually: one of the reasons TABis misunderstood is that cheap typewriters didn't have adjustable tabulator positions, and when computers came along it was often implemented with fixed columns (typically every 8), so people think of TAB as 8 spaces, which often is not what you want.