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

0.0.1 • Public • Published

json-deref

This is a very basic library to dereference JSON objects. It supports both local and remote references, but only supports root references (relative referencing is not supported).

Example

import { dereference } from 'json-deref';

await dereference({
  obj: {
    value: {
      $ref: 'https://example.com/schema#/value',
    },
  },
}, {
  loadSchema: async (url) => ({
    value: 500,
  })
})

Readme

Keywords

none

Package Sidebar

Install

npm i json-dereference

Weekly Downloads

3

Version

0.0.1

License

MIT

Unpacked Size

24.9 kB

Total Files

8

Last publish

Collaborators

  • liammartens