DEV Community

Cover image for Viewing and navigating huge JSON files (hundreds of megabytes) using Visual Studio Code
Thai Pangsakulyanont
Thai Pangsakulyanont

Posted on

Viewing and navigating huge JSON files (hundreds of megabytes) using Visual Studio Code

Problem: I am trying to view a huge JSON file.

Viewing this directly in VS Code, there is no syntax highlighting or folding. Navigating this JSON tree is incredibly difficult.

Solution: So, I created a new JavaScript file:



const data = require('./webpack.stats_master.json')
debugger


Enter fullscreen mode Exit fullscreen mode

โ€ฆand pressed F5.

This starts a Node.js debugging session.

Now, JSON data is visualized in a tree view. Problem is solved.

Top comments (2)

Collapse
 
alelom profile image
Alessio Lombardi • Edited

Still works only when the Json is not TOO large (>700mb here)

Image description

Collapse
 
mliakos profile image
Emmanouil Liakos

Smart!