hjson-js icon indicating copy to clipboard operation
hjson-js copied to clipboard

Not all fields it supports

Open AldieNightStar opened this issue 1 year ago • 3 comments

When i add 3+ fields using just space, it shows me Error: End of input while parsing an object (missing '}') at line 1,38 >>> name: "Haxi" age: 3 ....

{ name: "Haxi" age: 32" } - this is working { name: "Haxi" age: 32 role: "Admin" } - this is not

I am developer of Novel Engine, and it's currently in progress, so i thinking to take this as a library to parse HJson for it. It's free for everyone but still in development. So i considering it as a novel script language that can be easily parsed

AldieNightStar avatar Aug 24 '24 02:08 AldieNightStar

When placing several fields on the same line they need to be separated by commas. This should work:

{ name: "Haxi", age: 32, role: "Admin" }

trobro avatar Aug 31 '24 10:08 trobro

It would be great to make it tweakable to parse with commas or ignore. It still good

AldieNightStar avatar Aug 31 '24 10:08 AldieNightStar

Thanks! If you put fields on separate lines commas are not needed, but I will let this issue remain open in case anyone wants to create a PR for it.

trobro avatar Aug 31 '24 10:08 trobro