brianmario/yajl-ruby — Issue #95: Yajl ignores object-closing } and ], and may return wrong object and/or type
Author: vapir
Created: 2012-01-11 06:40:07+00:00
State: open

the input is missing a trailing } and yajl does not complain:

```ruby
>> Yajl::Parser.parse %Q({"a":{"a":"a"})
=> {"a"=>{"a"=>"a"}}
```

the input is missing a trailing ] and yajl does not complain:

```ruby
>> Yajl::Parser.parse %Q(["a")
=> ["a"]
```

the input is missing two trailing }s and yajl does not complain, and returns an incomplete, wrong object:

```ruby
>> Yajl::Parser.parse %Q({"a":{"a":"a")
=> {"a"=>"a"}
```

and with ]s:

```ruby
>> Yajl::Parser.parse %Q([["a")
=> ["a"]
```

the input is missing multiple trailing }s and/or trailing ]s, yajl does not complain, and returns an incomplete, wrong object of the wrong type:

```ruby
>> Yajl::Parser.parse %Q(["a", {"a":{"a":"a")
=> {"a"=>"a"}
```

```ruby
>> Yajl::Parser.parse %Q({"a": [["a")
=> ["a"]
```