Hello, I’d like to know how to validate documents. For instance, I have this document type (based on JSON) where an example of an accepted input is like:
{ "people": [
{"firstName":"Joe","lastName":"Jacky","age":21},
{"firstName":"Dana","lastName":"Salis","age":20}
]
}
Now, during the flow service, I want to make sure that the inserted input follows exactly like such format. So if even so much the name of the elements are different, then it catches an error. Therefore, if the input is like this:
{ "peoples": [
{"firstName":"Joe","lastName":"Jacky","age":21},
{"firstName":"Dana","lastName":"Salis","age":20}
]
}
Then it throws an error because it doesn’t have an element called ‘peoples’.
How do I put such validation? Because the last I tried that, the designer just accepted as it is and didn’t throw an error.
Thanks.
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB