-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
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
There seems to be a fundamental contradiction between the specification of escape sequences between JSON and raw strings. #3186
Comments
This doesn’t seem related to Intl; I’ll transfer it to 262. Why do you expect the output of String.raw to be JSON-parseable in a way that’s similar to the original? |
Actually, closing, since this is just the content of another person’s issue comment. |
I would expect the JSON as JSON to be parsable. The other person is my teammate, and I posted it here because it's not an issue with Hapi, it's an issue with ECMAScript. What would be the best place to reopen the issue? Am I wrong to expect the escaped quote to be escaped, and therefore for the JSON to be parsable? |
The consequence of this is that I can't receive some input to an API endpoint and parse it without causing an error. This is a fundamental need. In this case the client is trying to represent inches (as in: 'This board is 2" x 4"'). I don't have control over the format of this input, and currently we are having to write the stream directly to the file system and then translate it back in, instead of merely parsing it in the API endpoint. |
Yes. This isn't an issue with ECMAScript, and this isn't a support forum. I recommend trying StackOverflow. |
In case you haven’t figured this out yet: the string |
I did some analysis with Bourne.parse and JSON.parse. The issue is unrelated to request size and is only related to JSON string formatting. Consider the following examples:
hapijs/hapi#4461 (comment)
The text was updated successfully, but these errors were encountered: