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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
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?

Categories:
  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    Do you really need the parse action?

    Then you probably should change the schema.

     

  • philjn77 Profile Picture
    156 on at

    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
    8,729 Super User 2026 Season 2 on at

    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard