json-tkit
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Overview

json-tkit is a toolkit for JSON.

It supports serializing javascript object with circular references to JSON and vice versa.

Motivation

Inspiring JSON-js with NPM and TypeScript support.

Installation

npm install json-tkit

Usage

prerequest: import the module

import * as jsonx from "json-tkit";

Serialize an object with circular reference

let o: any = {};
o.o = o;

let s = jsonx.stringify(o);
console.log(s);

let o2 = jsonx.parse(s);
console.log(o2.o == o2);

Readme

Keywords

Package Sidebar

Install

npm i json-tkit

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • jyao