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 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:
I have the same question (0)
  • Chriddle Profile Picture
    8,436 Super User 2025 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,436 Super User 2025 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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard