Title: Json string handle
Last modified: September 8, 2022

---

# Json string handle

 *  [vhafdal](https://wordpress.org/support/users/vhafdal/)
 * (@vhafdal)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/json-string-handle/)
 * Hi,
    I am using the addon to post json to my API. Now that works…. except when
   a user put´s some characters in that have not been json escaped.
 *     ```
       {
       	"From": "[your-email]",
       	"Subject": "[your-subject]",
       	"Content": "[your-message]\r\n\r\nFyrirtæki: [your-company]",
       	"To": "xxxx@xxx.is",
       	"FullName": "[your-name]"
       }
       ```
   
 * No since the add-in obviously is not formatting variables based on the “API Input
   Type”
    I assume that I will need to handle this manually if that is even possible.
 * Should the add-in not handle the escape of string variables ?
 * To reproduce the issue you can set the content to for eample
 * This is { my [ \\r\\n þæöð
    [[[ { then again } ]]]
 * The add-in also shows that the form submitted successfully even though the API
   did return a http error code 400 with the error message.
    Is there no way to 
   enforce the error so the user does not get a success message and thinks everything
   is fine and no one gets notified of the form error.
 * Best regards,
    Valdi Hafdal

The topic ‘Json string handle’ is closed to new replies.

 * ![](https://ps.w.org/wpcf7-redirect/assets/icon-256x256.gif?rev=3416723)
 * [Redirection for Contact Form 7](https://wordpress.org/plugins/wpcf7-redirect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpcf7-redirect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpcf7-redirect/)
 * [Active Topics](https://wordpress.org/support/plugin/wpcf7-redirect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpcf7-redirect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpcf7-redirect/reviews/)

 * 0 replies
 * 0 participants
 * Last reply from: [vhafdal](https://wordpress.org/support/users/vhafdal/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/json-string-handle/)
 * Status: not resolved