pretty-print-json

WebJar for pretty-print-json

Лицензия

Лицензия

MIT
Категории

Категории

JSON Данные
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

pretty-print-json
Последняя версия

Последняя версия

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

pretty-print-json
WebJar for pretty-print-json
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/center-key/pretty-print-json

Скачать pretty-print-json

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/pretty-print-json/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>pretty-print-json</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/pretty-print-json/
implementation 'org.webjars.npm:pretty-print-json:0.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/pretty-print-json/
implementation ("org.webjars.npm:pretty-print-json:0.1.0")
'org.webjars.npm:pretty-print-json:jar:0.1.0'
<dependency org="org.webjars.npm" name="pretty-print-json" rev="0.1.0">
  <artifact name="pretty-print-json" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='pretty-print-json', version='0.1.0')
)
libraryDependencies += "org.webjars.npm" % "pretty-print-json" % "0.1.0"
[org.webjars.npm/pretty-print-json "0.1.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

pretty-print-json

logo

JavaScript library to pretty-print JSON data to HTML for formatted color display

License:MIT npm Size Vulnerabilities Hits Build

screenshot

1) Try it out

Interactive online tool to format JSON:
https://pretty-print-json.js.org

2) Setup

Browser

Load from the jsdelivr.com CDN:

<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/pretty-print-json@0.3/dist/pretty-print-json.css>
...
<script src=https://cdn.jsdelivr.net/npm/pretty-print-json@0.3/dist/pretty-print-json.min.js></script>

node

Install package from npm:

$ npm install pretty-print-json

Import into your application:

const prettyPrintJson = require('pretty-print-json');

3) Usage

API

const html = prettyPrintJson.toHtml(data[, options]);

Example

HTML:
<pre id=account></pre>
JavaScript:

Pass data into prettyPrintJson.toHtml() and display the results.

const data = { active: true, mode: '🚃', codes: [48348, 28923, 39080], city: 'London' };
const elem = document.getElementById('account');
elem.innerHTML = prettyPrintJson.toHtml(data);

Options

Name (key) Type Default Description
indent integer 3 Number of spaces for indentation.
linkUrls boolean true Create anchor tags for URLs.
quoteKeys boolean false Always double quote key names.

4) Contributor notes

To be a contributor, fork the project and run the commands npm install and npm test on your local clone.  Make your edits and rerun the tests.  Pull requests welcome.

Pull requests (PRs) should not update the version number in package.json or any files in the dist folder.  The version number and dist files are all updated as part of the release process.

Issues labeled "good first issue" make it easy for first time contributors to participate.  Only submit a PR for one of these issues if you're new to this project.



Feel free to submit questions at:
github.com/center-key/pretty-print-json/issues

MIT License | Blog post

org.webjars.npm

Center Key

Open source projects

Версии библиотеки

Версия
0.1.0