case classValidTokenizer(isCanonical: Boolean = true) extends JsonTokenizer with Product with Serializable
ValidTokenizer is a fair bit slower than FastTokenizer, but... you get full
JSON validaton. You also don't need to worry about estimating element capacity
as this uses dynamic array buffers. ValidTokenizer will give you high-quality
information if the JSON is wrong, so it's ideal for JSON you aren't confident about.
If your code is _really_ sophisticated, maybe it can first try to use the FastTokenizer,
and catch failures in a try block. The resolution of the error might be to re-parse
the troublesome JSON with the ValidTokenizer for a decent error message. Hmm...
As with all the tokenizers, this is *NOT* thread-safe! Don't share these across threads!
Linear Supertypes
Serializable, Serializable, Product, Equals, JsonTokenizer, AnyRef, Any
ValidTokenizer is a fair bit slower than FastTokenizer, but... you get full JSON validaton. You also don't need to worry about estimating element capacity as this uses dynamic array buffers. ValidTokenizer will give you high-quality information if the JSON is wrong, so it's ideal for JSON you aren't confident about.
If your code is _really_ sophisticated, maybe it can first try to use the FastTokenizer, and catch failures in a try block. The resolution of the error might be to re-parse the troublesome JSON with the ValidTokenizer for a decent error message. Hmm...
As with all the tokenizers, this is *NOT* thread-safe! Don't share these across threads!