JSON Syntax Error


I’m trying to create a JSON and send it via an API to XANO, but keep receiving the error message: “Error parsing JSON: Syntax error”} After trying a lot of different things, I found a way to “fix” the problem. I added the JSON to a Custom State, which populates an Input. Then, I created a button to send the Input content as JSON to the API. If I send it without making any changes, the error will appear. However, if I remove a space, add one, remove a letter, or make any other small change, the error is gone!

Here’s the API:

Here the JSON creator

Could anyone tell me what the problem might be?

Let me know if you need further assistance!

Any special characters? Missing values? Hard to know without the output result of your request. Maybe you can inspect it in logs and share it here or send the request to requestbin to inspect it.

1 Like

Thanks @Jici, for your assistance! Below is the JSON, which will be used for the API request. Interestingly, the error isn’t appearing in the logs. It seems to occur before the API request is sent, as XANO isn’t receiving anything. Any insights on how to troubleshoot this further?

[{ “bubbleId”: “1708537750272x499056252550174900”, “Category”: "Trio Scaled Feminino ", “Event”: “Teste Novo Scoring” },{ “bubbleId”: “1708537751164x154270693278396600”, “Category”: "Trio Scaled Misto ", “Event”: “Teste Novo Scoring” }]

Did you activate in logs, advanced logs? You need to activate some advanced logs to see the request (HTTP request and response)
What about the whole payload?
You can use jsonlint with the payload to inspect it and requestbin (change the url to requestbin in API Connector, trigger the WF like you did for your testing and inspect in requestbin). Actually, I don’t see anything wrong from this payload. So it could be in other part. Also, just see that you have missing Content-type header in the call. Maybe you have it as shared headers but be sure to have Content-type: application/json set

Thanks again. Will try it
But, as a said, It works fine when I remove a space from the generated JSON for example ( The other part receive it, no problem). Tested the JSON also and its fine. Seems like some kind of bubble bug…

1 Like