go-simplejson icon indicating copy to clipboard operation
go-simplejson copied to clipboard

a Go package to interact with arbitrary JSON

Results 34 go-simplejson issues
Sort by recently updated
recently updated
newest added

JSON Encode limit after golang 1.7. package "encoding/json" add function func (*Encoder) SetEscapeHTML to avoid json `Marshal` to escape html characters. suggest to add this feature to go-simplejson

hello ,can you add your copyright in your readme file or licence file

Here is my code example below func TestJson(t *testing.T){ sjson,_:=simplejson.NewJson([]byte(foo())) v,_:=sjson.Get("listmap").Get("100").String() fmt.Println(v)//Barcode_PreDelivery_STH-Electronic_Instant_Download } func TestJsonMap(t *testing.T){ sjson:=simplejson.New() listmap:=make(map[string]string) listmap["100"]="Barcode_PreDelivery_STH-Electronic_Instant_Download" sjson.Set("listmap",listmap) v,er:=sjson.Get("listmap").Get("100").String() fmt.Print(er)//raise type assertion to string failed fmt.Println(v)//Barcode_PreDelivery_STH-Electronic_Instant_Download body, _...

simplejosn error ``` s1 := `{\"status\": \"success\", \"task_type\": \"inject\", \"task_id\": \"WID1499340298605\", \"extra\": \"xxx\", \"timestamp\": 1499340275, \"message\": {\"code\": \"TI018\", \"hostname\": \"devops\", \"size\": 0}}` ``` parser success ``` s2 := `{"status": "success",...

first "Set" a json object into a new json object, and then the new json object "Get" the json out is error.because is the json address. ```go func (j *Json)...

I'd like to remove a key at given path, but unfortunately there's no straightforward method to do so.

sometimes you need to judge whether a Json is JsonArray or JsonObject, you need this.

simplejson makes it fairly easy to parse a complex JSON file into a data structure of a different schema but if I need to the reverse the operation I can't...

simplejson.Json implements the [`io.Reader`](https://golang.org/pkg/io/#Reader) interface: ``` go type Reader interface { Read(p []byte) (n int, err error) } ``` ##### Why? By implementing this standard interface simplejson would play nice...

when data is not array or map, return error.