Skip to main content
uttrat238161
Participating Frequently
Oct 31, 2023 7:27 AM UTC
Question

isjsonvalid not working for numeric values

I want to validate if a given value is a valid json or not but it's not working for numeric values. Please suggest a way to validate it properly.

isjsonvalid(1234)

isjsonvalid("123")

Both of the above statements are returning true even though they are not json.

4 replies

stefanhelzle0001
Brainy
Oct 31, 2023 8:03 AM UTC

My non-Appian JSON validator is fine with both.

uttrat238161
Participating Frequently
Oct 31, 2023 11:37 AM UTC

But I need this to be working on Appian

stefanhelzle0001
Brainy
Oct 31, 2023 11:43 AM UTC

I do not understand. Both of your values are valid JSON. So, the return values of that function are correct.