Made parsing of JSON arrays and objects stricter. Fixes issue #161.