Gojsonpointer

JSON Pointer implementation in Golang
Alternatives To Gojsonpointer
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Jwt6,9646,8175353 days ago51August 19, 20229bsd-3-clausePHP
A simple library to work with JSON Web Token and JSON Web Signature
Pyjwt4,5799,4431,60612 days ago45May 12, 202217mitPython
JSON Web Token implementation in Python
Jsmn3,265
18 days ago89mitC
Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket
Node Jwt Simple1,3207,8285692 years ago13March 30, 201933mitJavaScript
JWT(JSON Web Token) encode and decode module for node.js
Vault Ui1,299
5 years ago3October 04, 201750otherJavaScript
Vault-UI — A beautiful UI to manage your Vault, written in React
Frangipanni1,156
5 months ago6April 10, 20216mitGo
Program to convert lines of text into a tree structure.
Token Lists1,030518 days ago30June 16, 2022133mitTypeScript
📚 The Token Lists specification
Spring Boot Jwt1,022
a year agomitJava
JWT auth service using Spring Boot, Spring Security and MySQL
Jwt844
6 years agomitJava
webapp用户身份认证方案 JSON WEB TOKEN 实现Deme示例,Java版
Jsonwebtoken.swift659
314 years ago14November 06, 201726bsd-2-clauseSwift
Swift implementation of JSON Web Token (JWT).
Alternatives To Gojsonpointer
Select To Compare


Alternative Project Comparisons
Readme

gojsonpointer

An implementation of JSON Pointer - Go language

Usage

jsonText := `{
	"name": "Bobby B",
	"occupation": {
		"title" : "King",
		"years" : 15,
		"heir" : "Joffrey B"			
	}
}`

var jsonDocument map[string]interface{}
json.Unmarshal([]byte(jsonText), &jsonDocument)

//create a JSON pointer
pointerString := "/occupation/title"
pointer, _ := NewJsonPointer(pointerString)

//SET a new value for the "title" in the document     
pointer.Set(jsonDocument, "Supreme Leader of Westeros")

//GET the new "title" from the document
title, _, _ := pointer.Get(jsonDocument)
fmt.Println(title) //outputs "Supreme Leader of Westeros"

//DELETE the "heir" from the document
deletePointer := NewJsonPointer("/occupation/heir")
deletePointer.Delete(jsonDocument)

b, _ := json.Marshal(jsonDocument)
fmt.Println(string(b))
//outputs `{"name":"Bobby B","occupation":{"title":"Supreme Leader of Westeros","years":15}}`

References

https://tools.ietf.org/html/rfc6901

Note

The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented.

Popular Json Projects
Popular Token Projects
Popular Data Formats Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Golang
Json
Token
Json Pointer