Bug: Exported cc.json include data that is not supposed to be there
See original GitHub issueBug
Expected Behavior
- The node of
"type": "Folder"has empty"attributes": { } - The node of
"type": "File"does not have the attribute unary - The node of
"type": "File"does not have the"origin": "sample1.cc.json"
The visualization is not supposed to modify the "nodes": [] or "edges": []. These are generated by the analysis. More specifically the problems are:
- A folder is not supposed to have any attributes. The Visualization is supposed to either sum or average the "file"s inside a “folder” but should not store these values in the cc.json.
- The unary attribute is a virtual attribute that is 1 for each “file”. It’s not supposed to be in the cc.json.
- The origin is very useful to differentiate in Multiple Mode where the file came from. It’s weird to have it when I opened the file in Single Mode.
Now for the bigger question: If I had openend multiple files in Multiple Mode should the “origin” be there for each “file”? I don’t think it should. Currently the download button in Multiple Mode can be used to merge files but that was never the intention of *Multiple Mode. Merging files is supposed to be done by analysis and the merge filter. I think we should disable the download button for Multiple and Delta Mode because it’s unclear what the resulting file will contain.
Actual Behavior
When I save a cc.json from the visualization it includes data it’s not supposed to include:
- The node of
"type": "Folder"has"attributes": { "unary": 4, "avgCommits": 146, "rloc": 600, ... } - The node of
"type": "File"has this"attributes": { "unary": 4 } - The node of
"type": "File"has this"origin": "sample1.cc.json"
Steps to Reproduce the Problem
- Open CodeCharta with mini-map
- Press the download button
- Press save
Specifications
- Version: 1.32.0
- Platform: Web
- Subsystem: Visualization
- Browser: Firefox
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to resolve react export error for JSON in react js?
1 Answer. Save this answer. Show activity on this post. The reason you are getting an error is because it is trying to...
Read more >Misleading error that module does not provide export #32137
cjs' does not provide an export named 'name' which is only "true" because ES modules aren't allowed to import CJS named exports. The...
Read more >1944733 – [RFE] There is no option to do an incremental ...
Bug 1944733 - [RFE] There is no option to do an incremental content view export using 'hammer content-view version export'.
Read more >How to prevent ExportString from reencoding diacritics when ...
1. After you Export to JSON, try doing BinaryReadList on the file and comparing the bytes you see with ToCharacterCode on the string...
Read more >768470 - Export and import memory reporter data as JSON
This patch just serializes the memory reports as JSON text and then deserializes them before continuing, as a basic proof of context. There's...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m with @alschmut here, the file is not intended to be read manually. If someone still wants to do that, there are programs that format json automatically.
With this issue implemented, I just shortly wanna mention, how much smaller in size our exported files just got. When I imported the same 1.5MB cc.json file and exported it afterwards, it had surprisingly just 1.3MB. I don’t have an answer to why it is even smaller than 1.5MB, but I guess its a pretty good improvement from exporting a file which had 8.6MB before.