big-json icon indicating copy to clipboard operation
big-json copied to clipboard

Support parsing root JSON Array

Open MichaelHirn opened this issue 5 years ago • 3 comments

FIXES: #19

MichaelHirn avatar Jan 26 '20 20:01 MichaelHirn

Coverage Status

Coverage decreased (-2.1%) to 96.296% when pulling 78828050a488322eb8d45e35230b339d09afe341 on MichaelHirn:feat/array into 7b5d15d8ab4c1c15e8cc55b390c1bed3441db26c on DonutEspresso:master.

coveralls avatar Jan 26 '20 20:01 coveralls

This is clever! I think this might accidentally convert {"0":"zero", "1":"one"} into an array though. With the way JSONStream works I'm not sure if there's a way to know without specifying it up front when you create the stream. We could add a new option on createParseStream that lets you specify the type of object you want to parse. Would that work for you?

DonutEspresso avatar Apr 03 '20 07:04 DonutEspresso

If it is fine with you I will attempt to resolve the issues you have with this pull request soon. Stumbled upon the same issue as the author of this pull request.

MoritzLoewenstein avatar Jan 05 '21 17:01 MoritzLoewenstein

Merged in #27

DonutEspresso avatar Oct 10 '22 18:10 DonutEspresso