Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
/ ajson Public archive

a very simple to use go JSON library combining the usage of gJSON and sJSON,

Notifications You must be signed in to change notification settings

skateboard/ajson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AllJson

This package brings together gJSON and sJSON in 1 library allow you to read and set json values quickly and effectively.

Usage

package main

import "github.com/skateboard/ajson"

const json = `{"name":{"first":"Janet","last":"Prichard"},"age":47}`

func main() {
	r := ajson.Parse(json)
	
	beforeValue := r.Get("name.last")
	println(beforeValue.String())
	
	r.Set("name.first", "Jospeh")

	afterValue := r.Get("name.last")
	println(afterValue.String())
	
	r.Create("dob", "4/12/1984")

	bobV := r.Get("dob")
	println(bobV.String())
}

About

a very simple to use go JSON library combining the usage of gJSON and sJSON,

Resources

Stars

Watchers

Forks

Languages