parsing json via import() fails for escaped characters
### Description
Parsing JSON via `await import()` fails for escaped characters like `\"`.
### Steps to reproduce
1. Create a file test.json with this content: `["\"Test"]`
2. Run llrt in the same directory as the test json file e.g. `.\llrt.exe`
3. Run `await import("./test.json")`
### Expected Behavior
The JSON is parsed correctly as
`{ default: [ '"Test' ] }`
### Current Behavior
Parsing fails with error:
`Error: "[""Test"]
" not valid JSON at index 0`
### Context
Nodejs parses the same json test file correctly using the with type json attribute.
`node`
`await import("./test.json",{with: {type: "json"}})`
`{ default: [ '"Test' ] }
`
0 条评论