@johefe/perfsee-jsonr
TypeScript icon, indicating that this package has built-in type declarations

1.14.0-alpha.0 • Public • Published

jsonr

JSON with references

Example

import JSONR from '@johefe/perfsee-jsonr'

const jsonrStr = JSONR.stringify({ hello: "world" })
const obj = JSONR.parse(jsonrStr)

Format

const obj = { a: { hello: 'world', foooobar: 1 }, b: [] as any[] }
obj.b.push(obj.a, obj.a, obj.a)

const jsonrStr = JSONR.stringify(obj)

jsonrStr ->

{
  "a": {
    "hello": "world",
    "foooobar"$0: 1
  },
  "b": [
    {
      "hello"$1: "world"$2,
      $0: 1
    },
    {
      $1:$2,
      $0: 1
    },
    {
      $1:$2,
      $0: 1
    }
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i @johefe/perfsee-jsonr

Weekly Downloads

7

Version

1.14.0-alpha.0

License

Apache-2.0

Unpacked Size

67.9 kB

Total Files

17

Last publish

Collaborators

  • johe