You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the suggestion. I'm not sure it makes a lot of sense to number the lines, as it's not "lines of code", it's a data structure. How would it look when collapsed? It makes sense for a code editor, but this is not a code editor nor is it intended to replace one.
What is the use case you're thinking of where this would be helpful?
Thanks for the response! I suppose it's a matter of preference, I personally prefer to see line numbers when I'm editing JSON (particularly larger files), but perhaps others don't. It's a common feature in other JSON viewing/editing tools I have used in the past. I don't envision a specific use case beyond helping users navigate documents and orient themselves.
For collapsed sections, line numbers could either reflect the first line of the block (e.g., the line where the opening brace or bracket starts) or provide a range (e.g., 12-30 if the collapsed block spans multiple lines). Have a look at jsonformatter.org for an example of the former.
Yeah, I can see the appeal in certain situations. It would actually be fairly tricky to implement though, since each node of the tree is essentially a stand-alone component, and has no knowledge of where it fits in the bigger structure. So calculating what each line would be would require some thought.
I'll keep the idea in mind, but I wouldn't expect to implement it any time soon.
It would be nice to see line numbers, as in geist code blocks.
The text was updated successfully, but these errors were encountered: