Converting circular structure to JSON
I have recently encountered the below error while using the JSON.stringify for a class object. Error: “stack”:[“TypeError: Converting circular structure to JSON”,” –> starting at object with constructor ‘Cluster'”,” | property ‘_source’ -> object with constructor ‘AutoconfSource'”,” — property ‘_cluster’ closes the circle”,” at JSON.stringify (<anonymous>)” Let’s decode this in this article, so that it […]
JSON.stringify() returns empty object.
We often encounter this issue, that while trying to stringify the error object, it returns the empty object. Many developers have below questions in their mind. Q. JSON.stringify is not able to return any value for error objects, neither throwing any error why? Q. JSON.stringify is not working properly for error object why? Q. JSON.stringify […]