Re:Show HN: Charcoal – Faster utf8.Valid using multi-byte pr...
by ncruces on Wednesday March 27, 2024 @12:01PM
(#39840988)
Both JSON encoding and decoding require UTF-8 validation.
If there's a workload that makes sense to optimize because it's used in production, it's UTF-8 validation.
So why are we even arguing whether UTF-8 validation is necessary/useful in the "hot path" or in "production"?
Re:Show HN: Charcoal – Faster utf8.Valid using multi-byte pr...
by Dylan16807 on Wednesday March 27, 2024 @02:40PM
(#39842998)
So you asked what I thought, but I never gave an opinion on UTF-8, I gave a generic hypothetical.
If you're asking about OP's idea, then I agree that validating the UTF-8 inside of JSON is needed sometimes, though it's not required in all situations. But I wasn't commenting on that, I was commenting on the specific objection of "how do you know if you don't check?", because I don't think that specific objection is very strong.
I said hypothetical, and I did not use the word JSON.