fastjson icon indicating copy to clipboard operation
fastjson copied to clipboard

Unsupported type (supported by golang lib)

Open tschirmer opened this issue 6 years ago • 0 comments

Found that maps aren't supported where they are in encoding/json

         customData := make(map[int64]mypackage.CustomStruct)
	 encoded, encerr := fastjson.Marshal(customData)
	 if encerr != nil {
	 	log.Println(encerr)
	 	return
	 }
	 _, buferr := w.Write(encoded)
	 if buferr != nil {
	 	log.Println(buferr)
	 	return
	 }

results in: 2019/12/30 19:05:36 json: unsupported type: map[int64]mypackage.CustomStruct

tschirmer avatar Dec 30 '19 09:12 tschirmer