discoveryjs / discovery

A framework for rapid data (JSON) analysis, shareable serverless reports and dashboards
https://discoveryjs.github.io/discovery/
MIT License
336 stars 6 forks source link

Some JSON is not parsed successfully #48

Closed rualark closed 1 year ago

rualark commented 4 years ago

Unfortunately, today I found JSON which is not parsed by JsonDiscovery at all. This JSON is parsed successfully by Visual Studio Code.

This big json is not much different from all the other big jsons that I used to parse with JsonDiscovery successfully.

Unfortunately, I cannot provide this json and it is too big to replace sensitive data (2 megabytes). But if you add some debugging logs to plugin, I will be able to see mistakes where parsing failed.

lahmatiy commented 4 years ago

JsonDiscovery is using standard library to parse JSON, i.e. JSON.parse(). There are possible reasons JSON is not parsed:

I'm not sure, is there is any error in console when parsing failing (I guess not, because it ). Just try to parse your JSON with Node.js (JSON.parse(require('./path/to.json'))), you will see an error if any. If no errors, then the reason in JSON detection. VS Code uses it own parsers for incremental parsing and other stuff. It doesn't fail usually but shows warnings.

lahmatiy commented 4 years ago

This issue should be in JsonDiscovery repo. FYI @exdis

lahmatiy commented 1 year ago

We are found the root cause of the problem (yeah, finally!). It's already fixed and waiting for publishing to stores. See details in JsonDiscovery issue.