JSONVALID determines whether a buffer contains valid JSON text. This function returns a size_t 1 value of zero if the JSON text is valid; otherwise, it returns the index of the first invalid byte.
>>-JSONVALID(p,n)----------------------------------------------><