Json and base64 encoders