question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to parse json with boundary symbols in the response

See original GitHub issue

I’m using meros with relay for the @defer feature and by a coincidence we got exactly --- symbols in a particular field of received json, which leads to a parse error, because part.json is false.

Of course we can just remove these symbols from the data, but maybe there is a better way to handle it in the library?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
maraisrcommented, Feb 27, 2022

Ive released 1.2.0 as stable 🎉, that contains the fixes outlined in this chatter. Hopefully that lines it up with our MS/C# is composing messages.

1reaction
maraisrcommented, Dec 24, 2021

You shouldnt worry about that, if you JSON encode you will never collide with a boundary coz \r\n---\r\n is encoded away with json, like '"\\r\\n---\\r\\n"' (note the double slashes)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to parse TAB in JSON files - Stack Overflow
It means that a literal tab character is not allowed inside a JSON string. You need to escape it as \t (in a...
Read more >
[Function Connectors] ERROR: "Unable to parse JSON ...
Cause. The response outputted from your function is not supported by the connector. Was this article helpful?
Read more >
SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >
Parsing post data 3 different ways in Node.js without third ...
First we read the values from username and password by using the given id s in the form. We then create the JSON...
Read more >
How to Parse a JSON Request Body in Go - Alex Edwards
Unmarshal() , which would return an error if the body contains multiple JSON objects. The downside of using json.Unmarshal() is that there is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found