fixing json array serialization. Fixes #2

All tests seem to still pass after following instructions from
@tkaczmarczyk on how to fix the issue.