Git Product home page Git Product logo

aykutsarac / jsoncrack-vscode Goto Github PK

View Code? Open in Web Editor NEW
351.0 8.0 40.0 1.85 MB

VS Code extension of JSON Crack. Convert your JSON files into graphs with a single click and view them onto graphs.

Home Page: https://marketplace.visualstudio.com/items?itemName=AykutSarac.jsoncrack-vscode

License: MIT License

TypeScript 80.66% HTML 3.89% JavaScript 13.52% CSS 1.93%
jsoncrack react vscode typescript extension

jsoncrack-vscode's Introduction

JSON Crack

JSON Crack is a powerful and innovative VS Code extension designed to revolutionize the way you interact with JSON data. Seamlessly bridging the gap between data and visualization, this extension empowers developers, data analysts, and enthusiasts to effortlessly transform complex JSON datasets into informative and visually appealing graphs. This is an extension brought by jsoncrack.com.

How to use?

  1. Install the JSON Crack extension from the VS Code marketplace.
  2. Open a JSON file.
  3. Click on the JSON Crack icon (icon) in the menubar.
  4. Watch as your JSON data transforms into insightful graphs.
image

Contributing

  1. Run yarn install
  2. Run yarn build
  3. Press F5 to debug

For every change at codebase you should re-do the steps 2 and 3.

jsoncrack-vscode's People

Contributors

aykutsarac avatar reneschumacher avatar worksofliam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsoncrack-vscode's Issues

[BUG]: Black Screen, no data view

Issue description

I installed jsoncrack v1.0.8 on VS-Code v1.73.1.
When I open a json file and then start jsoncrack, it just displays an empty black window.

grafik

After a restart of code, each start of jsoncrack pops up a message:

grafik

As I said, this message only comes up, after vs code has restarted and jsoncrack is started again.

Media & Screenshots

No response

Operating system

  • OS: Ubuntu 22.04
  • VS-Code v1.73.1
  • jsoncrack v1.0.8

Priority this issue should have

High (immediate attention needed)

Support for JSON comments

Feature

Title says it all. I'd like the following content to be rendered as if the commented lines were ignored. Right the preview doesn't load because this is technically invalid data.

{
 "hello": "there!"
  // general kenobi !
}

Alternative solutions or implementations

No response

Other context

No response

Embedding in external website

Feature

I'm the developer of a website that uses Monaco editor, and I would like to display side-by-side the editor and JSON crack for some JSON configuration data in a few scenarios. I know I can accomplish this through hacking into the codebase, but I saw some threads that an embed mechanism is in the works.

Are there plans on creating an angular component or some binding so it can be nearly natively used in an Angular app?

Would also want to fully host the assets since we don't want to depend on CDNs that we don't manage.

Alternative solutions or implementations

If it's not possible to create a native Angular component that can be released, can you create a window:onmessage interface for most events so we can create event-based bindings to load and view the code?

Other context

This particular website uses only Angular. Ideally we would prefer to use a native component, but we can support using other frameworks via loading them in special encapsulated iframes.

I'm willing to write an Angular wrapper if using window messages is the only way to do this, and can publish it for the community.

[BUG]: Extension Incorrectly Renders Nested Arrays as Sequential Elements

Issue description

The JSON Crack extension for Visual Studio Code is currently displaying nested arrays as sequential elements, which is inconsistent with the intended representation of JSON data. Nested arrays should be rendered as hierarchical structures to accurately reflect the JSON data structure.

  [
    [
      ["xxx", "yyy"],
      ["xxx", "yyy"]
    ],
    ["xxx"]
  ]

Media & Screenshots

No response

Operating system

VS Code, Windows 10

Priority this issue should have

Low (slightly annoying)

Unique tab-names

Feature

Unsure of feasibility, but a minor suggestion -
When opening multiple JSON Crack graphs, is it possible to enable unique tab-names (e.g. 'JSON Crack filename')?

The current behaviour appears to name all tabs 'JSON Crack':

Screenshot 2023-02-06 at 17 28 26

In any case, great tool!

Alternative solutions or implementations

No response

Other context

No response

Search Option

Feature

It would be nice to have the feature for searching objects When visualizing in the graph

Alternative solutions or implementations

No response

Other context

No response

Would you consider publishing react components you use in this project to npm?

Feature

I think this is a great product, and thank you so much for the effort you've put into this. I've been building a widget viewer for react components over at kamp-us/monorepo#216 and i've been looking for a detailed json viewer to use in my experimental widget viewer.

I'd really love to be able to use https://github.com/AykutSarac/jsoncrack-vscode/blob/master/src/components/Graph/index.tsx in my widget viewer if this was a separate package.

I, and my community are ready to help in anyway we can.

Alternative solutions or implementations

No response

Other context

Here is a simple ugly json viewer i am currently hacking with 😅

image

I can not build the extension. Error Child compilation failed:

Hi,

I'm getting an error that prevents the extension to be built.

I've ran the scripts start, compile and watch, but they are not working. After running these commands, and keep the watch running on the terminal, I've launched the script "Run extension" configuration located in .vscode/launch.json file, and I get this error:

Activating extension 'AykutSarac.jsoncrack-vscode' failed: Cannot find module '/home/karl/github/jsoncrack-vscode/build/ext-src/extension.js'
Require stack:
- /usr/share/code/resources/app/out/vs/loader.js
- /usr/share/code/resources/app/out/bootstrap-amd.js
- /usr/share/code/resources/app/out/bootstrap-fork.js.

It appears the extension could not be activated.

If I check localhost:3000 I've got this error

Html Webpack Plugin:

  Error: Child compilation failed:
  [eslint] Must use import to load ES Module: /home/karl/github/jsoncrack-vscode/node_modules/@eslint/eslintrc/universal.js
  require() of ES modules is not supported.
  require() of /home/karl/github/jsoncrack-vscode/node_modules/@eslint/eslintrc/universal.js from /home/karl/github/jsoncrack-vscode/node_modules/eslint/lib/linter/linter.js is an ES modul  e file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
  Instead rename universal.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/karl/github/jsoncrack-vscode/node_modules/@eslint/eslintrc/pa  ckage.json.
  
  - child-compiler.js:169 
    [jsoncrack-vscode]/[html-webpack-plugin]/lib/child-compiler.js:169:18
  
  - Compiler.js:551 finalCallback
    [jsoncrack-vscode]/[webpack]/lib/Compiler.js:551:5
  
  - Compiler.js:577 
    [jsoncrack-vscode]/[webpack]/lib/Compiler.js:577:11
  
  - Compiler.js:1196 
    [jsoncrack-vscode]/[webpack]/lib/Compiler.js:1196:17
  
  
  - task_queues.js:97 processTicksAndRejections
    internal/process/task_queues.js:97:5
  
  - task_queues.js:66 runNextTicks
    internal/process/task_queues.js:66:3
  
  - timers.js:429 processImmediate
    internal/timers.js:429:9
  

I think maybe it's an issue due to the stack I'm using to build the project. I've user first node version v12.16.2 and then v16.17.0. But it may be a mismatch.

To get the extension working, I needed to build the extension using the script build: yarn build. This command compiles the extension, and then I can launch the Run extension and I get the extension running. But it will be nice to have a dev script working, so when I modify a specific file, the extension gets automatically compiled and I can quickly test my changes.

Add description/Feature how to run in using self-hosted instance

Feature

Hi,

How can I use the vscode with a self-hosted instance?
Is it possible to declare the hosting URL (either localhost or something else)?

I'd wish to have this feature and if already available a description on the readme how to change the settings.
This goes along with #9 to add settings, declaring the URL

Alternative solutions or implementations

No response

Other context

No response

IntelliJ IDE plugin version

Feature

Looking to use it from PyCharm. Would this be possible?
Very useful project indeed.

Alternative solutions or implementations

Keep using the website

Other context

No response

[BUG]: Not able install extension in VS code (ver-1.70.1)

Issue description

Can't install 'aykutsarac.jsoncrack-vscode' extension because it is not compatible with the current version of Visual Studio Code (version 1.70.1).

Media & Screenshots

No response

Operating system

  • OS: [e.g. iOS]:

  • Browser [e.g. chrome, safari]:

  • Any other details...
    MAC

Priority this issue should have

Medium (should be fixed soon)

[BUG]: Extension does not appear to work on macOS Ventura

Issue description

Three separate people have installed this extension on various macOS systems, and when they open a JSON file and click on the icon for JSON Crack, it simply opens up a blank page, usually with no error, although once I was able to get this:

Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..

I have no idea if this impacts other systems, but it appears to be impacting multiple macOS installs.

Media & Screenshots

bug

Operating system

  • OS: [e.g. iOS]: macOS 13.0
  • Browser [e.g. chrome, safari]: vscode (chrome, safari, and firefox are all on the system)
  • vscode: 1.73.0

Priority this issue should have

High (immediate attention needed)

[BUG]: Can't run - You d'ont have an extension for debugging JSON message

Issue description

I install jsoncrack-vscode extension. When i try to run it on .json file i see this message - You d'ont have an extension for debugging JSON message

What i have to do ?

Media & Screenshots

No response

Operating system

  • OS: [e.g. iOS]:

  • Browser [e.g. chrome, safari]:

  • Any other details...

Priority this issue should have

Low (slightly annoying)

YAML Support

Feature

Feature Request:

json-crack appears to support yaml files however the vscode plugin only appears to render json file.
It would be really nice if this support was added in.

Alternative solutions or implementations

No response

Other context

No response

JSON crack not showing graph sometime untill you restart

Type: Bug

open any json sometimes it shows sometimes it doesnt untill a restart is done

Extension version: 1.0.8
VS Code version: Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:47:05.613Z)
OS version: Linux x64 5.19.0-41-generic snap
Modes:
Sandboxed: Yes

VS Code Theme Matching

Feature

It seems like the color scheme used by JSON Crack does not match the color theme used by VSCode. Using the same color scheme to display the JSON diagrams would keep the experience consistent with the rest of the app

Alternative solutions or implementations

No response

Other context

No response

Visualize JSON from snippets

Feature

It will be nice to have the possibility to select some valid (or not) JSON object and be able to click somewhere or select from the contextual menu to visualise it. Now the only way to enable the visualisation is when .json file is open.

Thank you and great work!

Alternative solutions or implementations

No response

Other context

No response

[BUG]: Not compatible with Vscode version 1.70.0

Issue description

I've tried to install but Vs code says it is not compatible with my Vs code version 1.70.0
image

Media & Screenshots

No response

Operating system

  • OS: Windows 10

Priority this issue should have

High (immediate attention needed)

Yaml, Toml, support

Feature

There are many other file formats which could benefit from this type of interface. Specifically, YAML files when working on things like Helm charts and TOML files when working with pyproject.toml files in Python.

How hard is it to extend what you have into other file formats?

Alternative solutions or implementations

No response

Other context

No response

Add VS Code settings

Feature

Maybe I missed it, but is there a way to add VS Code user settings like:

{
  "AykutSarac.jsoncrack-vscode": {
    "lightmode": true
  }
}

I'm specifically looking to use "expand": false in VS Code so the nodes all render the same width, like how the editor works. Thanks!

Alternative solutions or implementations

No response

Other context

No response

Feature request: Rotate visualization

Feature

Currently, it does not seem possible to rotate the visualization like in the Editor.

In particular, the default view orients data left-to-right. If you're using a vertical sidepanel and a deep JSON object, the visualization will fit the pane much better with a top-down orientation.

Alternative solutions or implementations

No response

Other context

No response

Is this app avaliable with VS Code version 1.70.2?

Feature

I can't download this extension from the vs code extensions marketplace, I get the errors saying "it's not compatible with the current version of Visual Studio Code (1.70.2)".

Are there any plans to resolve this?

Alternative solutions or implementations

No response

Other context

I'm willing to do the adjustments if you can help plan what needs doing.

Feature request: Visualize JSON on selection

Feature

Thanks for a great extension.

When working with JSON embedded in other file types (like say Javascript), it would be nice to be able to select a JSON object and visualize with JSON Crack via right-click context menu or command pallette.

Similarly, when navigating a really complex JSON structure, it would be nice to visualize just the selected content.

Alternative solutions or implementations

Copy and pasting the JSON into a new file doesn't really work because the JSON Crack view is not available if the file is unsaved.

Other context

No response

JSON schema support

Feature

JSON schema itself is also json file but the graphic representation from the standard json is different: https://json-schema.org/learn/getting-started-step-by-step

It will be total win to have the json schema visualization feature in this awesome extension. Currently Im using Altova XMLSpy for this purpose which is not so handy as VSC.

Thanks for consideration and discussion.

Alternative solutions or implementations

No response

Other context

No response

[BUG]: No Save/Download option with VSCode

Issue description

There is no option to save the rendered mapping with the VSCode Extension. The Save and SaveAs do not seem to have any connection with the generated diagram

Media & Screenshots

No response

Operating system

Version: 1.75.1
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:34:59.000Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Darwin x64 21.6.0
Sandboxed: No

Priority this issue should have

Low (slightly annoying)

[BUG]: Large JSON files

Issue description

Steps to reproduce issue:
1 - Get a large JSON file (>= 8.7 MB)
2 - Try to visualize it with the extension in VSCode
3 - No graph is ever displayed

Media & Screenshots

![WhatsApp Image 2024-01-18 at 20 41 54](https://github.com/AykutSarac/jsoncrack-vscode/assets/45538225/84178946-33ca-4d51-a192-a69dd65c31b4)

Operating system

Ubuntu 22.04

Priority this issue should have

Medium (should be fixed soon)

How can I use this extension

Issue description

Hi,

I ve installed this extension on vscode. My question is how can I use it. When I click on a random json file, the text editor that opens is the normal one. Further I can not see this extension on the left bar where my other extensions are.

Could somebody help med ? thanks!

Media & Screenshots

No response

Operating system

  • OS: [e.g. iOS]:

  • Browser [e.g. chrome, safari]:

  • Any other details...

Priority this issue should have

High (immediate attention needed)

Hanlde large json files

Feature

I have a json file which has 22380 lines of json code. The tool crashes when I try to visualise the file contents.
Can we find a way to support rendering large json files?

Alternative solutions or implementations

No response

Other context

No response

List of known bugs & requests

Currently the VS Code extension using the older version of JSON Crack graph, thus there are couple of problems occurring also being outdated. There is a plan to publish an npm package to let everyone use JSON Crack at their own projects, this includes the VS Code extension.

After the release following issues will be handled:

  • Better documentation for extension
  • Graph is not being rendered
  • Not working for some versions of VS Code
  • Publish package at Open VSX
  • Add toolbar

[BUG]: command ‘jsoncrack-vscode.start’ not found

Issue description

Installed the json crack extinction
Open sample json file
Selected the json crack icon
Getting error :
command ‘jsoncrack-vscode.start’ not found

Media & Screenshots

No response

Operating system

  • OS: [e.g. iOS]:

  • Browser [e.g. chrome, safari]:

  • Any other details...

Priority this issue should have

Low (slightly annoying)

Add support for files.associations

Feature

Would be great if it also picked up all of my custom file associations to identify files with custom extensions as being json files.

in .vscode/settings.json

{
  "files.associations": {
    "*.gltf": "json"
  }
}

Alternative solutions or implementations

No response

Other context

No response

Extension does not work when ordering view

  • When asking to view the json the extension does not read the file when updating the file the view starts working
    image
  • Update json
    image
  • I sent my friend to do a test, he didn't have this problem, he uses Windows 10 22H2

image

  • I use Windows 8.1 Version 6.3 (Build 9600)

[BUG]: Extension doesnt show icon for .jsonc files.

Issue description

The extension doesnt detect .jsonc as a file it should show the icon for.
Its still possible to open it manually via the command panel command,
and the extension works properly for .jsonc files aswell.

Seems this could be impemented by adding .jsonc as a file extension for the icon check.
And maybe in future we could have support for showing the comments inside the visualizer aswell as this other issue suggested. #30

Operating system

  • Os Macos Ventura
  • Vscode Version: 1.82.0

Priority this issue should have

Low (slightly annoying)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.