Potential fix for "recursion detected" issue

This PR is a potential fix for #61 and #59.

Note, however, that I do not think I have actually fixed the issue, as the end result of `'{"0":{}}'` is not truly correct. It should be `[{}]`, right?