GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dansalias/json_pointer: JSON Pointer for Deno (IETF RFC6901).

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
mod.ts
mod.ts
 
 
test.ts
test.ts
 
 

Repository files navigation

test

Complete implementation of JSON Pointer for Deno, as per IETF RFC6901

Usage

import * as jp from 'https://deno.land/x/json_pointer/mod.ts'

const obj = {
  'foo': ['bar', 'baz'],
  'qux': { 'quux': 'quuz' },
}

// jp.get(obj: object, pointer: string): any
jp.get(obj, '/foo/0')           // 'bar'
jp.get(obj, '/qux/quux')        // 'quuz'
jp.get(obj, '/hello')           // undefined

// jp.set(obj: object, pointer: string, value: any): void
jp.set(obj, '/foo/1', 'becue')  // obj.foo === ['bar', 'becue']
jp.set(obj, '/foo/-', 'bax')    // obj.foo === ['bar', 'becue', 'bax']
jp.set(obj, '/new/path', 'val') // obj.new === { path: 'val' }

Testing

git clone https://github.com/dansalias/json_pointer
cd ./json_pointer
deno test

About

JSON Pointer for Deno (IETF RFC6901).

Topics

denojson-pointer

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.