(self)
| 336 | return self.read_json(pa.py_buffer(b), **kwargs) |
| 337 | |
| 338 | def test_file_object(self): |
| 339 | data = b'{"a": 1, "b": 2}\n' |
| 340 | expected_data = {'a': [1], 'b': [2]} |
| 341 | bio = io.BytesIO(data) |
| 342 | table = self.read_json(bio) |
| 343 | assert table.to_pydict() == expected_data |
| 344 | # Text files not allowed |
| 345 | sio = io.StringIO(data.decode()) |
| 346 | with pytest.raises(TypeError): |
| 347 | self.read_json(sio) |
| 348 | |
| 349 | def test_reconcile_across_blocks(self): |
| 350 | # ARROW-12065: reconciling inferred types across blocks |