T
T
Taras Labiak2018-05-21 05:35:40
JSON
Taras Labiak, 2018-05-21 05:35:40

In what format is it convenient to create and edit nested lists?

We need a format similar to YAML in which such a structure would be possible

sass:
  folder:
    subfolder:
      - one
    - _variables.scss  # Sass Variables
    - _functions.scss  # Sass Functions

To do this, you can use XML, but without extra characters, something like pug (jade). So that there is no difference between an array and a dictionary, and there are comments.
Those. syntax consists of nodes, nodes can have child nodes and that's it. In JSON it would look like this:
{
"sass": {
  "folder": {
    "subfolder": {
      "one": null
    },
    "_variables.scss": null,
    "_functions.scss": null
  }
}
}

I could even write a parser myself for such a simple language, but I have never written plug-ins for IntelliJ and I don’t want to create extra work for myself.
JSON 5 could also work if you didn't have to write : null in every empty node

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question