function

validdata

A built-in CFEngine function in the data category that returns a class. validdata is not called from the policy on your hosts.

Signature
validdata(string, option, [option], ...)
Parameters
  1. string String to validate as JSON (.*)
  2. option Type of data to validate (JSON)
  3. option Enable more strict validation, requiring the result to be a valid data container, matching the requirements of parsejson(). (true,false,yes,no,on,off)
Variadic: at least 2 and at most 3 arguments.
Returns
context
Category
data