HTTP request body json invalid #21541
Replies: 2 comments
-
The "json_invalid" error happens when the HTTP node's body is not a single, valid JSON string. Dify expects exactly one JSON entry in the body, and it must be valid JSON—otherwise, it raises an error and the node fails to run. This can happen if you have multiple entries in the body, or if the JSON syntax is malformed (for example: missing brackets, extra commas, or unescaped quotes) [source]. To fix this:
If you’re still stuck, feel free to share the exact JSON body you’re using (with any sensitive info removed) and I can help spot the issue. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
I have solved the problem myself. Here should be json string minified in oneline without prettier such as \r \n |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
When I use a HTTP node, and set the json to Body as the picture above, I have a problem after running when receiving response and it says json_invalid. How to solve this problem?
Beta Was this translation helpful? Give feedback.
All reactions