Function regorust::regoSetInputJSON
source · pub unsafe extern "C" fn regoSetInputJSON(
rego: *mut regoInterpreter,
contents: *const c_char,
) -> regoEnum
Expand description
Sets the current input document from the specified string.
The string should contain a single JSON value. The value will be parsed and set as the interpreter’s input document.
If an error code is returned, more error information can be obtained by calling regoGetError.
@deprecated This method’s name is misleading, as the input term can be any
valid Rego (i.e. not just JSON). Please use the updated version
regoSetInputTerm
.
@param rego The interpreter.
@param contents The contents of the JSON value.
@return REGO_OK if successful, REGO_ERROR otherwise.