oboe.js
oboe.js copied to clipboard
unable to parse keys that are empty strings
Hi,
When parsing JSON that looks like this:
{
"key1": "value1",
"": "value2"
}
An error is thrown and the parsing is unsuccessful:
TypeError: Cannot read property '0' of undefined
at C:\test\node_modules\oboe\dist\oboe-node.js:121:33
at appendBuiltContent (C:\test\node_modules\oboe\dist\oboe-node.js:1453:15)
at nodeOpened (C:\test\node_modules\oboe\dist\oboe-node.js:1434:7)
at C:\test\node_modules\oboe\dist\oboe-node.js:1048:19
at applyEach (C:\test\node_modules\oboe\dist\oboe-node.js:496:20)
at emit (C:\test\node_modules\oboe\dist\oboe-node.js:1929:10)
at handleData (C:\test\node_modules\oboe\dist\oboe-node.js:860:18)
at applyEach (C:\test\node_modules\oboe\dist\oboe-node.js:496:20)
at Object.emit (C:\test\node_modules\oboe\dist\oboe-node.js:1929:10)
at ReadStream.<anonymous> (C:\test\node_modules\oboe\dist\oboe-node.js:1128:34)
The issue is with empty strings that are property keys. This error was originally posted in #86, but it doesn't appear to be related to that issue. I've spent a few hours trying to debug the issue, but have come up empty handed.
+1 I have the same issue
I've found and fixed the issue, which is in the forked clarinet module. I ended up fixing it in the current clarinet project as well (dscape/clarinet#43) just to get some more unit tests running against my logic. I'll be filing a pull request against oboe.js shortly.
I verified the problem here https://square-gem.hyperdev.space/