Open
Description
When input data contains strings with escaped characters (e.g. "/"), input byte array passed to gojay.Unmarshal
is altered.
A sample code is given below
package main
import (
"log"
"github.com/francoispqt/gojay"
)
func main() {
data := []byte(`"msn.com\/fr-fr"`)
var s string
if err := gojay.Unmarshal(data, &s); err != nil {
log.Println(err)
}
log.Printf("buffer is: %s\n", string(data))
}
This outputs "msn.com/fr-fr""
, while original buffer is "msn.com\/fr-fr"
.
This is a problem because we need to use the original buffer as is to do other processing.
Metadata
Metadata
Assignees
Labels
No labels