Skip to content

Does ecode show parsing errors with languages JSON files? #486

Answered by SpartanJ
groggily asked this question in Q&A
Discussion options

You must be logged in to vote

Parsing as if JSON is invalid will be printed in the logs. It will display something like:

2025-05-29 00:39:51 - ERROR: SyntaxDefinition load failed:
[json.exception.parse_error.101] parse error at line 10, column 17: syntax error while parsing object - unexpected string literal; expected '}'

Which is the JSON parser error. Also ecode does lint JSON files natively, so it's also visible while editing.

My thought is instead of failing silently and doing no syntax highlighting at all (plain text), it's better to tell the users where it's stuck.

Parsing errors should be the least of the problems since they're obvious. The hard part is actually doing a correct highlighter.

Not to talk abou…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by groggily
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants