Temporary custom JSON encoder.