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.

Discussion: Any plan to make Connection Send API support circular reference JSON structure?

See original GitHub issue

The connection Send API is using native JSON.stringify which does not support circular structure.

Tried to remove cyclic reference the object before calling the API. However, that impacts the performance heavily for large data object.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mweststratecommented, May 18, 2020

No, the JSON api very deliberately doesn’t support circular graphs indeed, just like it doesn’t support classes, maps, sets, etc etc. Serializing these kind of data structures would yield a high performance impact on a very intensively used api, so we don’t plan to support this.

Any specific reason why you would wan’t to send cyclic data?

0reactions
plwaicommented, May 18, 2020

Okay. In this case, I agree that it is better to handle the issue in plugin level. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Converting Circular Structure to JSON - Career Karma
Circular JSON serializes and deserializes otherwise valid JSON objects containing circular references into and from a specialized JSON format.
Read more >
How to fix TypeError: Converting circular structure to JSON in ...
Learn what is TypeError, and how to go about fixing the error "Converting circular structure to JSON" in JSON.stringify() method.
Read more >
TypeError: Converting circular structure to JSON - Stack ...
It means that the object you pass in the request (I guess it is pagedoc ) has a circular reference, something like: var...
Read more >
How to print a circular structure in a JSON like format using ...
The circular structure is when you try to reference an object which directly or indirectly references itself. Example: A -> B -> A...
Read more >
code quality - What's wrong with circular references?
There are a great many things wrong with circular references: Circular class references create high coupling; both classes must be ...
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