This function and its methods allows the caller to verify if the
JSON content is strictly valid. Even if the content is invalid,
the parser may still be able to make sense of it or at least
get it partially correct and yield a result.
So this function allows the caller to verify that the input is
legitimate and not just rely on the parser not failing.