@yihui and I are seeing the following behavior: ``` > cat( toJSON( list(x=1, y=character(0)) ) ) { "x": 1, "y": 1 } ``` This is because [`unlist`](https://github.com/duncantl/RJSONIO/blob/master/R/json.R#L281) is used to collect results, but because the `y` element is empty, it is dropped and then the element `1` is recycled.
@yihui and I are seeing the following behavior:
This is because
unlistis used to collect results, but because theyelement is empty, it is dropped and then the element1is recycled.