Method Standards.JSON5.validate()


Method validate

int validate(string s)

Description

Checks if a string is valid JSON5.

Returns

In case the string contains valid JSON5 -1 is returned. It is then guaranteed to be parsed without errors by decode(). In case the string is not valid JSON5, the error position is returned.