Add basic JSON writing