Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

JSON Validation

(0) ShareShare
ReportReport
Posted on by 156

Hi

 

I'm parsing some JSON data and I'm hitting a problem where a value is defined as being an integer in the schema, but when there is no data for an individual record, it's being returned as an empty string so it should be:

 

 

value: 12345

 

 

but when 'value' has no value, it's given as:

 

 

value: ""

 

 

Because it's expecting an integer, it gives me a validation error. I'm quite new to JSON so maybe i'm missing something obvious, but what is the best way around it? Can I make it be more flexible with the data its expecting in the schema, or can i make it ignore this error, or do i need to modify the JSON content with string replacement before I use the JSON parser?

  • Chriddle Profile Picture
    7,922 Super User 2025 Season 1 on at
    Re: JSON Validation

    Yes, you'd have to replace it.

    That's exactly what the scheme is good for, at least you know where the service is messing up for you.

  • philjn77 Profile Picture
    156 on at
    Re: JSON Validation

    Do you mean change the schema i'm providing in power automate or change the schema of the source json, because thats not something i can do as its a 3rd party API.

     

    By taking out the type i've managed to get around it as I dont need this data in any circumstance - though it leaves me wondering what i'd do if I did need it when it was present. 

     

    I guess I'd have to do string replacement? 

  • Chriddle Profile Picture
    7,922 Super User 2025 Season 1 on at
    Re: JSON Validation

    Do you really need the parse action?

    Then you probably should change the schema.

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1