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?
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.
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?
Do you really need the parse action?
Then you probably should change the schema.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1