data := "{'value':'data'}"
str, err := jsonparser.GetString([]byte(data), "value")
if err != nil {
fmt.Print(err)
} else {
fmt.Print(str)
}
This example fails to find the key "value" because it is surrounded by single quotes instead of double quotes. Even though "technically", they should be double quotes, it'd be nice if the parser handled single quotes interchangeably.
This example fails to find the key "value" because it is surrounded by single quotes instead of double quotes. Even though "technically", they should be double quotes, it'd be nice if the parser handled single quotes interchangeably.