Add a helper for encoding JavaScript values into JSON String format. The implementation is based on JSON String format and preserves JavaScript objects like Buffers and Dates, as opposed to encoding format.