web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / 'Unexpected character ...
Power Automate
Answered

'Unexpected character encountered while parsing value: P. Path '', line 0, position 0.'.

(1) ShareShare
ReportReport
Posted on by 72
Hi Everyone,
I am having an error in my Parse JSON step. I have read all the replies in the forum as well as the external website discussions, but could not come up with a solution/explanation.
I have a JSON file that I use for customer details. For simplicity, I reduced it to two customers, with customer name name and the people to put in to and cc in the email communication:
 
{
  "customers": [
    {
      "name": "Customer 1",
      "to": [
        "contactA@customer1.com",
        "contactB@customer1.com"
      ],
      "cc": [
        "contactC@customer1.com",
        "contactD@customer1.com"
      ]
    },
    {
      "name": "Customer 2",
      "to": [
        "contactE@customer2.com",
        "contactF@customer2.com"
      ],
      "cc": [
        "contactG@customer2.com",
        "contactH@customer2.com"
      ]
    }
  ]
}
 
I checked the JSON, and successfully deserializes.
 
I create a Parse JSON step in Power Automate, click on the "Generate from sample", paste the above JSON and Power Automate successfully generates the schema:
{
    "type": "object",
    "properties": {
        "customers": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "to": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "cc": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "name",
                    "to",
                    "cc"
                ]
            }
        }
    }
}
 
Up to this point, everything goes successful, and I can save the flow. But when I it, the flow errors out:
 
The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value cannot be parsed: 'Unexpected character encountered while parsing value: P. Path '', line 0, position 0.'.
 
Any ideas?
 
Thank you!
 
Tolga
Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at
    I think this is happening because during the flow run, the data is not valid JSON.

    I can reproduce the exact same error by providing data that is not valid JSON.  If you try the following sample data for the content of the Parse JSON action:
    Person: { "name": "Alice Smith", "to": ["alice.smith@example.com"], "cc": ["cc.person1@example.com"] }
    It should generate the same error:
     
     
     
    When I try the same flow with your sample data, the flow works without issue.


      
    Please share the screenshot of the Parse JSON action as you see above. Examine the content and check if this is what you are expecting.
     
     
     
    Ellis
  • tolga-balci Profile Picture
    72 on at
    Thanks a lot Ellis. This clarifies. Many thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard