You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: benchmarks/results/errorReportingQuality.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -503,7 +503,13 @@ Jison appears to return different line number of the error occurrence. If there
503
503
504
504
### [JSON5]
505
505
506
-
A short and technical message. Structured information about the error contains only the line and column, bot not the offset.
506
+
A short and technical message. Structured information about the error contains only the line and column, but not the offset.
507
+
508
+
The context information can be added using the line and column of the error.
509
+
510
+
### [JSON6]
511
+
512
+
A short and technical message. Extra information about the error is appended to the error message. It contains the offset, the line and column, and an excerpt of the invalid input.
507
513
508
514
The context information can be added using the line and column of the error.
509
515
@@ -517,4 +523,5 @@ The context information can be added using the line and column of the error.
Copy file name to clipboardExpand all lines: benchmarks/results/evaluation.md
+3-4
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The best parser is likely to be chosen specifically for the particular usage sce
8
8
Universal Parser
9
9
----------------
10
10
11
-
The most understandable messages are reported by [JJU] and [PEG.js]. The performance of the latter is not on par with the fastest parsers, but other parsers generated from a grammar specification are even slower.
11
+
The most understandable messages are reported by [JJU] and [PEG.js]. The performance of the latter is not on par with the fastest parsers, but other parsers generated from a grammar specification are even slower.[JSON6] contains the extended information, but appended to the error message, which can make it longer and not so easy to read.
12
12
13
13
Validate Standard JSON As Fast As Possible
14
14
------------------------------------------
@@ -18,7 +18,7 @@ The [built-in] native JSON parser (`JSON.parse`) offers by far the best performa
18
18
Validate Non-Standard JSON
19
19
--------------------------
20
20
21
-
Depending on extra features required, [Chevrotain]and [JJU] offer the best quality/performance ratio. Chevrotain tries harder to explain, what was wrong, which is often quite counterproductive. JJU explains the problems well-enough with a single sentence, even ended by a full-stop. Chevrotain packs additional features like recovery and reporting all errors instead of just the first one. This extra feature might make it a winner for a flexibly configurable scenario. However, the Chevrotain parser needs significantly more code, than all the others.
21
+
Depending on extra features required, [Chevrotain], [JJU]and [JSON6] offer the best quality/performance ratio. Chevrotain tries harder to explain, what was wrong, which is often quite counterproductive. JJU explains the problems well-enough with a single sentence, even ended by a full-stop. Chevrotain packs additional features like recovery and reporting all errors instead of just the first one. This extra feature might make it a winner for a flexibly configurable scenario. However, the Chevrotain parser needs significantly more code, than all the others. JSON6 supports many extensions to JSON/JSON5 standards.
22
22
23
23
[tested with a JSON grammar]: https://sap.github.io/chevrotain/performance/
24
24
[performance]: ./performance.md
@@ -27,5 +27,4 @@ Depending on extra features required, [Chevrotain] and [JJU] offer the best qual
0 commit comments