Encoder that encodes a single object as a UTF-8 encoded JSON string.
This encoder works equivalently to first converting the object to a JSON string, and then UTF-8 encoding the string, but without creating an intermediate string.