json-parse-better-errors

WebJar for json-parse-better-errors

Лицензия

Лицензия

MIT
Категории

Категории

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

Группа

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

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

json-parse-better-errors
Последняя версия

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

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

json-parse-better-errors
WebJar for json-parse-better-errors
Ссылка на сайт

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

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

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

https://github.com/zkat/json-parse-better-errors

Скачать json-parse-better-errors

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

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

Зависимости

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

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

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

json-parse-better-errors npm version license Travis AppVeyor Coverage Status

json-parse-better-errors is a Node.js library for getting nicer errors out of JSON.parse(), including context and position of the parse errors.

Install

$ npm install --save json-parse-better-errors

Table of Contents

Example

const parseJson = require('json-parse-better-errors')

parseJson('"foo"')
parseJson('garbage') // more useful error message

Features

  • Like JSON.parse, but the errors are better.

Contributing

The npm team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The Contributor Guide has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.

All participants and maintainers in this project are expected to follow Code of Conduct, and just generally be excellent to each other.

Please refer to the Changelog for project history details, too.

Happy hacking!

API

> parse(txt, ?reviver, ?context=20)

Works just like JSON.parse, but will include a bit more information when an error happens.

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

Версия
1.0.2
1.0.1