@nodifier/json
v1.0.0
Published
Utils for various JSON related tasks
Downloads
3
Maintainers
Readme
@nodifier/json
Utils for various JSON related tasks
How to use?
You can import the module to your code as follows:
import { tryParseJson } from "@nodify/json";
tryParseJson
import { tryParseJson } from "@nodify/json";
const jsonObject = tryParseJson('{\"foo\":\"bar\"}');
The above will return a JSON object and it will return the string as is if it is not JSON compliance.
isStrJson
import { isStrJson } from "@nodify/json";
const output = isStrJson('{\"foo\":\"bar\"}');
The above will return a boolean flag if the given string is a JSON compliance or not.