Gojsonpointer

JSON Pointer implementation in Golang
Alternatives To Gojsonpointer
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Jwt7,0606,8175354 days ago53February 25, 20237bsd-3-clausePHP
A simple library to work with JSON Web Token and JSON Web Signature
Pyjwt4,6929,4432,1929 days ago48July 18, 202318mitPython
JSON Web Token implementation in Python
Jsmn3,265
4 months ago89mitC
Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket
Node Jwt Simple1,3207,8286462 years ago13March 30, 201933mitJavaScript
JWT(JSON Web Token) encode and decode module for node.js
Vault Ui1,29915 years ago3October 04, 201750otherJavaScript
Vault-UI — A beautiful UI to manage your Vault, written in React
Frangipanni1,190
3 months ago6April 10, 20217mitGo
Program to convert lines of text into a tree structure.
Token Lists1,1623875 days ago33July 05, 2023185mitTypeScript
📚 The Token Lists specification
Spring Boot Jwt1,022
2 years agomitJava
JWT auth service using Spring Boot, Spring Security and MySQL
Jwt844
6 years agomitJava
webapp用户身份认证方案 JSON WEB TOKEN 实现Deme示例,Java版
Jwt Cpp666
a month ago5June 22, 202238mitC++
A header only library for creating and validating json web tokens in c++
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.
Go
Golang
Json
Token
Json Pointer