Package Exports
- parse-json-object
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-json-object) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Parse a typed JSON object.
- Returns
undefinedif unable to parse - Returns typed JSON object if successful
Installation
yarn add parse-json-objectnpm install parse-json-objectAPI
Types
import parse, {
isJSONObject,
JSONObject,
JSONValue,
JSONArray
} from "parse-json-object";
function parse<T extends JSONObject>(json?: string) => T | undefined;
function isJSONObject(object?: JSONValue): object is JSONObject;
type JSONObject = {
[key in string]?: JSONValue
};
type JSONValue = string | number | boolean | null | JSONObject | JSONArray;
interface JSONArray extends Array<JSONValue> {};Dependencies
- types-json: Type checking for JSON objects
Dev Dependencies
- @bconnorwhite/bob: Bob is a toolkit for TypeScript projects
License 
Related Packages:
- stringify-json-object: Stringify and format a JSON object.
- types-json: Type checking for JSON objects