deepmodeling / dpgen2

2nd generation of the Deep Potential GENerator
https://docs.deepmodeling.com/projects/dpgen2/
GNU Lesser General Public License v3.0
33 stars 26 forks source link

Inpurt script switches to json5 format #94

Open wanghan-iapcm opened 2 years ago

wanghan-iapcm commented 2 years ago

The json5 format is a extension of the json format, and is more human readable and easier to write. The main advantages:

More details are found on the official web site of json5

The json5 is parsed by python package pyjson5

link89 commented 1 year ago

I think YAML is good enough for most cases. If people feel that writing yaml/json directly is annoy, they could just write some Typescript script to generate YAML/JSON file. There are even modern solutions like cue-lang to validate and generate YAML configuration. Both Typescript and cue-lang are working well with VsCode if you define the type schema properly.

njzjz commented 2 months ago

I think YAML is good enough for most cases.

I agree with it as YAML is also a superset of JSON and also supports all of these features (comments, no quotation, etc). However, it seems to me that dpgen2 has not supported YAML yet.