JSON Node - Schema validation

#1

Is it possible to validate JSON object schema without converting it to string?
I just want to validate it, not convert.

0 Likes

#2

Yes, the node has the option to ensure the output is a particular type ... I can't remember the exact words we used in the option, but it's there.

0 Likes

#3

Actually, having had a quick look at the code, it appears it only validates when doing the conversion. If the payload is already the required type, it doesn't validate.

If you wanted to raise an issue so we do not forget, I think it would be sensible for the node to support validation without conversion.

0 Likes

#4
0 Likes

#5

Not the right repo for a core node (https://github.com/node-red/node-red) but thanks anyway.

0 Likes

#6

Now I know why I couldn't find code... :slightly_smiling_face:

0 Likes