Fix to_json method name