| 48 | end |
| 49 | |
| 50 | def test_ignore |
| 51 | @options.unexpected_field_behavior = :ignore |
| 52 | table = Arrow::JSONReader.new(open_input(<<-JSON), @options) |
| 53 | { "message": "Hello", "count": 3.5, "valid": false } |
| 54 | { "message": "World", "count": 3.25, "valid": true } |
| 55 | JSON |
| 56 | columns = { |
| 57 | "message" => build_string_array(["Hello", "World"]), |
| 58 | } |
| 59 | assert_equal(build_table(columns), |
| 60 | table.read) |
| 61 | end |
| 62 | |
| 63 | def test_error |
| 64 | @options.unexpected_field_behavior = :error |