try-parse-json

WebJar for try-parse-json

License

License

MIT
Categories

Categories

JSON Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

try-parse-json
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

try-parse-json
WebJar for try-parse-json
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/MatthewLarner/try-parse-json

Download try-parse-json

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

try-parse-json

JSON.parse() wrapped in a try catch. Returns any error instead of throwing.

Usage

var tryParseJSON = require('try-parse-json');

tryParseJSON('{"a": 1, "b": 2}') // {a:1, b:2}

Errors

tryParseJSON('[1, 2, 3,]').message // 'Unexpected token ]'

Versions

Version
1.0.2