How to handle stringified JSON data in Quickwork?
I’m facing an issue where the output of my HTTP Trigger contains string values instead of a parsed JSON format. The body is defined as JSON in the journey and in Postman, but no response is logged. How can I resolve this issue and ensure the payload is processed as JSON?
0
-
Stringified JSON data often occurs due to one of the following reasons:
- Mismatch in request method:
- Ensure the HTTP method in your API testing tool matches the one configured in the journey. For example, both should be set to POST.
- Using different methods, like POST in the journey and GET in the testing tool, results in an empty payload and no logged output.
- Invalid request header:
- The content-pype of the request header must be set to application/json.
- Avoid other content types like HTML, JavaScript, or form-data, as they will not process JSON data correctly.
- Malformed JSON body:
- Verify that the JSON body adheres to valid syntax rules:
- JSON data must be enclosed within curly braces {}.
- Keys and string values must be wrapped in double quotes. For example, "name":"john".
- End each key-value pair with a comma, except for the last one.
- Do not include a trailing comma after the final key-value pair or closing curly brace.
For more details, refer to the troubleshooting section in your journey's History tab to validate the input and output payloads.
0
Please sign in to leave a comment.
Comments
1 comment