-
Notifications
You must be signed in to change notification settings - Fork 272
Open
Milestone
Description
I've experienced some issues with long strings:
- Very slow parsing on long strings (1MB)
- Crash with very long strings: Due to recursive calls and string concatenation, the current implementation crashes with 100MB strings.
I've included 2 test cases to validate this behaviour:
t.equal(
JSON5.parse("'" + 'a'.repeat(1000 * 1000) + "'"),
'a'.repeat(1000 * 1000),
'parse long json string (1MB)'
)
t.equal(
JSON5.parse("'" + 'a'.repeat(100 * 1000 * 1000) + "'"),
'a'.repeat(100 * 1000 * 1000),
'parse very long json string (100MB)'
)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels