-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hello.
I am experimenting with using this for parsing Visual Studio Code's settings.json files which are in Microsoft's flavor of JSONC.
That syntax supports trailing commas, JS-style, like:
{
"hello": "world",
}But when I try to parse this snippet with this library, it raises:
jsonc_parser.errors.ParserError: <path> file cannot be parsed (message: Expecting property name enclosed in double quotes
Perhaps this library is implementing a narrower spec than VS Code's (is there a spec for JSONC at all?), but I wonder if this lack of comma support makes it not so useful for practical purposes.
Also, a question (and maybe a bug), is parse_str,
jsonc-parser/jsonc_parser/parser.py
Line 14 in 76d4421
| def parse_str(_string: str) -> dict: |
supposed to be an instance method (with self) or a @staticmethod (like parse_file)?
Thank you.
Metadata
Metadata
Assignees
Labels
No labels