We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Save API callbackHandler

Re-Open
Darius Studdard asked on April 6, 2021

Hi,
I noticed that your save API has changed in the latest update which has lead to me having to change our application to work with it.  In the result.response property of the callback handler, the response being received from our server is coming back with any quote characters encoded as """.  Here's an example response: "{"status":"OK","tempFileName":"myFile.json"}".
This differs from the previous save API implementation where the server's response would come back as "{"status":"OK","tempFileName":"myFile.json"}". 
I've worked around this by updating my code that parses this JSON to replace the &quot encoding like this: "var resultObj = JSON.parse(result.response.replace(/"/g, '"')); "  but it is a bit messy/inconvenient.  
Is there any way that this response can be encoded correctly in a future update? Otherwise, I'd suggest updating your documentation to include this difference as it was something I had to discover on my own after debugging.

5 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster April 8, 2021

Hi Darius,
 
Thank you for reporting this – we've reproduced this behavior on our side.
 
We'll ensure that the server response is returned with simple quotes – the fix will become available with our upcoming release on ETA May 5th.
 
Please let us know if there is anything else we can help you with in the meantime.
 
Best regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster May 5, 2021

Hi Darius,
 
Hope you're having a great day!
 
The save method's callback response is no longer enclosed with the Unicode entity quote character – this is available in the 2.8.32 version of Flexmonster: https://www.flexmonster.com/release-notes/.
 
You are welcome to update the component. Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please let us know if you have any other questions we can help you with.
 
Best regards,
Mykhailo

Public
Darius Studdard May 5, 2021

Thanks for addressing this.  I'll look to revert our code back to what it was and will test this in a future release of our software.

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster May 19, 2021

Hi Darius,
 
How are you?
 
Just checking in whether you already had a chance to test out the discussed fix. Is everything working well for you?
 
We'd be happy to hear from you.
 
Regards,
Mykhailo

Public
Darius Studdard May 21, 2021

Hi Mykhailo,
I haven't reverted our code back to it's old state yet as we are still using an older Flexmonster version for release to our customers but once we update to the latest I will test things out.  Thank you for following up!

Please login or Register to Submit Answer