Adds test for JSON.stringification of trimmed arrays. Closes #246