A small package for performantly inserting properties into byte-encoded JSON objects using Golang.
package main
import (
"github.com/b3ntly/insertjson"
)
func main(){
key := "id"
value := "1"
example := []byte(`{"name":"fred", "thing":"foo"}`)
println(string(insertjson.Property(key, value, example))
}
{"id":"1","name":"fred", "thing":"foo"}