improve JSON conversions