JSON encoder, decoder. Works with any object structure (not just stdClass). Throws exceptions on JSON decoding errors.