how to get the result for all json array objects in R or plumber API

Hi ,

i am using plumber api so sneding the json request as an array to my api .
for eg:
{
"EmployeeInfo": [
{
"Name":"John",
"Id":"9469",
"Dept Id":49
},
{
"Name":"John1",
"Id":"9569",
"Dept id":40
}
}
this is my json request and accordingly i have my json schema using draft 4 version.
and to validate my input request i am using function json:validator.
now this function validate my input json according to the schema and throws the error . if 1st objects fails and does not validate 2nd request.
validate(req$postBody,error=true) but i want to validate all the object of my array.so in case ist object (name "john" ) fails it should throw error as invalid name according to json also it should validate the 2nd object also and provide the result as valid request . as i am using mahine learning model also so i get the result from model.but issue is if 1st object fails during validation it throws the error and come out, but i want to continoue the validation and print the result for both along with error.is it possible.please help

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.