We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello
I'm porting a service from JVM to Nodejs
JVM
Nodejs
This services handles YAML and for history reasons, it still have to handle some JSON.
I expect that the YAML parser can handle any JSON, as the JVM lib that I use on JVM do.
This lib handle some JSON, but not any JSON (in general, pprint'ed JSON dosen't work)
https://yaml.org/ - 08-APR-2005 -- As it turns out, YAML is a superset of the JSON serialization language
- 08-APR-2005 -- As it turns out, YAML is a superset of the JSON serialization language
node: v15.1.0
yamljs: v0.3.0
Example data:
{ "a": 42 }
One-line reproduce:
node -e "console.log(require('yamljs').parse(JSON.stringify({a: 42}, null, 2)))"
Current output:
$ node -e "console.log(require('yamljs').parse(JSON.stringify({a: 42}, null, 2)))" /home/souenzzo/.../node_modules/yamljs/lib/Parser.js:267 throw e; ^ /home/souenzzo/.../node_modules/yamljs/lib/Parser.js:267 throw e; ^ [ParseException [Error]: Malformed inline YAML string ({ "a": 42 }).] { parsedLine: 1, snippet: '{' }
Expected output
$ node -e "console.log(require('yamljs').parse(JSON.stringify({a: 42}, null, 2)))" { a: 42 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello
I'm porting a service from
JVM
toNodejs
This services handles YAML and for history reasons, it still have to handle some JSON.
I expect that the YAML parser can handle any JSON, as the JVM lib that I use on JVM do.
This lib handle some JSON, but not any JSON (in general, pprint'ed JSON dosen't work)
https://yaml.org/
- 08-APR-2005 -- As it turns out, YAML is a superset of the JSON serialization language
node: v15.1.0
yamljs: v0.3.0
Example data:
One-line reproduce:
node -e "console.log(require('yamljs').parse(JSON.stringify({a: 42}, null, 2)))"
Current output:
Expected output
$ node -e "console.log(require('yamljs').parse(JSON.stringify({a: 42}, null, 2)))" { a: 42 }
The text was updated successfully, but these errors were encountered: