Add transform_json method