Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Error of "Http request failed: the content was not a valid JSON." when using REST to JSON connector

Error of "Http request failed: the content was not a valid JSON." when using REST to JSON connector. The body result contains CDATA formatting, and this custom connector's action's schema property is set to "String" type, with no specific "Format". I tried a format of "Binary" as well, and the same error occurred.


Why is the Flow trying to parse the result from this action's body result's string value? Can it not just return as a normal string and not be parsed by the flow?

Super User
Super User

HI @mysticode 


Is there a way for you to share an annonimized sample of your JSON so that we can take a look?


If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


When this returns with "Value" being blank, my custom connector Method returns without any errors:


    "statusCode": 200,
    "headers": {
        "Cache-Control": "max-age=0, private",
        "Date": "Tue, 15 Sep 2020 21:43:52 GMT",
        "X-AspNet-Version": "4.0.30319",
        "Content-Length": "447",
        "Content-Type": "application/json"
    "body": {
        "projectRespondentResponseGetResponse": {
            "projectRespondentResponseGetResult": {
                "methodname": "ProjectRespondentResponseGet",
                "result": {
                    "success": true,
                    "id": "00000000-0000-0000-0000-000000000000",
                    "value": "",
                    "errors": []
However, if "Value" returns with the actual data I want, it causes the Flow error that I mentioned originally:
<![CDATA[{"answers":[{"answercompl":"","answertext":"","detail":"","element":"First Name:","idelement":"","progid":"","rowsorter":-1,"sorter":1000008,"subdetail":""},:""}

Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,944)