diff --git a/pandas/tests/io/json/test_json_table_schema.py b/pandas/tests/io/json/test_json_table_schema.py index b204d3bb97b6e..f7aade1f27529 100644 --- a/pandas/tests/io/json/test_json_table_schema.py +++ b/pandas/tests/io/json/test_json_table_schema.py @@ -789,3 +789,25 @@ def test_empty_frame_roundtrip(self): out = df.to_json(orient="table") result = pd.read_json(out, orient="table") tm.assert_frame_equal(expected, result) + + def test_read_json_orient_table_old_schema_version(self): + df_json = """ + { + "schema":{ + "fields":[ + {"name":"index","type":"integer"}, + {"name":"a","type":"string"} + ], + "primaryKey":["index"], + "pandas_version":"0.20.0" + }, + "data":[ + {"index":0,"a":1}, + {"index":1,"a":2.0}, + {"index":2,"a":"s"} + ] + } + """ + expected = DataFrame({"a": [1, 2.0, "s"]}) + result = pd.read_json(df_json, orient="table") + tm.assert_frame_equal(expected, result)