BUG: bug in json lib when frame has length zero
closes https://github.com/pydata/pandas/issues/9781

on master:

```
>>> df = DataFrame(columns=['jim', 'joe'])
>>> df
Empty DataFrame
Columns: [jim, joe]
Index: []
>>> df.to_json()
'{}'
```

mixed type will segfault:

```
>>> df['joe'] = df['joe'].astype('i8')
>>> df.to_json()
Segmentation fault (core dumped)
```

on branch:

```
>>> df.to_json()
'{"jim":{},"joe":{}}'
>>> df['joe'] = df['joe'].astype('i8')
>>> read_json(df.to_json())
Empty DataFrame
Columns: [jim, joe]
Index: []
```

Awesome, thanks!
 @shoyer i am not sure this actually closes https://github.com/pydata/pandas/issues/9781

this handles the case in [the comments](https://github.com/pydata/pandas/issues/9781#issuecomment-88884808) but the OP's issue may still persists.
 OK, that may have been a bit premature :).
 can you test your new code on that pickle file?
 I hit this error in `0.16.0`
