You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue-json-pretty

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-json-pretty

A JSON tree view component that is easy to use and also supports data selection.

1.6.2
Source
npmnpm
Version published
Weekly downloads
174K
1.41%
Maintainers
1
Weekly downloads
 
Created

What is vue-json-pretty?

vue-json-pretty is a Vue.js component for rendering JSON data in a pretty, formatted way. It is useful for displaying JSON data in a readable format with syntax highlighting and collapsible nodes.

What are vue-json-pretty's main functionalities?

Pretty JSON Rendering

This feature allows you to render JSON data in a visually appealing format. The component takes a JSON object as a prop and displays it with proper indentation and styling.

<template>
  <vue-json-pretty :data="jsonData" />
</template>

<script>
import VueJsonPretty from 'vue-json-pretty';
import 'vue-json-pretty/lib/styles.css';

export default {
  components: { VueJsonPretty },
  data() {
    return {
      jsonData: {
        name: "John Doe",
        age: 30,
        city: "New York"
      }
    };
  }
};
</script>

Collapsible Nodes

This feature allows you to collapse and expand nodes in the JSON structure. By setting the 'deep' prop, you can control the initial depth of expanded nodes, making it easier to navigate large JSON objects.

<template>
  <vue-json-pretty :data="jsonData" :deep="1" />
</template>

<script>
import VueJsonPretty from 'vue-json-pretty';
import 'vue-json-pretty/lib/styles.css';

export default {
  components: { VueJsonPretty },
  data() {
    return {
      jsonData: {
        name: "John Doe",
        details: {
          age: 30,
          city: "New York"
        }
      }
    };
  }
};
</script>

Other packages similar to vue-json-pretty

Keywords

vue

FAQs

Package last updated on 31 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts