Why You’re Failing at typeerror converting circular structure to json


The thing I’m trying to convey here is that I have never seen an error message like this before. I thought I was reading the documentation for my web API, but I was actually looking at a JSON example.

I was working on a project where I was trying to build a custom REST API for a company. This project was based on the idea of a company having their own custom web service that they could use. The custom web service would be their own, using their own structure to store their information. This is a common idea in open source projects but it’s not something I’ve seen much before.

In this case, the web service used a JSON structure, so we were getting a circular structure. The problem I had was that I had already sent my users a JSON structure, so the API client was expecting a JSON structure. Ive found that an odd behavior when a web service returns JSON data.

the problem with this structure is that it does not handle nesting (which is very common as is). If the JSON structure is not defined in the web service, it will just store the circular structure. What I found odd is that the web service is using a custom JSON structure that was just defined in the client rather than a specific structure that the web service could be returning.

I was surprised at how easy it was to convert from JSON to the JSON structure that the API client expects. We’re using RestSharp, which is a nice tool for converting between the two.

I’m not sure if this is the best way to do this or not. If you can’t get the expected behavior from the API client, what you could do is either send the same JSON data that you expect to be returned, or send the circular structure. In the case of the latter, you would need to modify the API to accept the JSON data that you expected.

It may be better to send the circular structure, as it should be the way the API client expects it to be represented.

Thanks to a user on reddit, I was able to get an example of sending the circular structure, but I didn’t get the expected behavior from the API client, so there might be a better way to do this.

If you are sending circular structure, your API client may need to be modified to accept it, as it may be used for something else besides creating the circular structure.