github.com/zerosnake0/jzon@v0.0.9-0.20230801092939-1b135cb83f7f/val_decoder_json_rawmessage.go (about) 1 package jzon 2 3 import "unsafe" 4 5 type jsonRawMessageDecoder struct { 6 } 7 8 func (*jsonRawMessageDecoder) Decode(ptr unsafe.Pointer, it *Iterator, _ *DecOpts) error { 9 bytePtr := (*[]byte)(ptr) 10 b, err := it.AppendRaw((*bytePtr)[:0]) 11 if err == nil { 12 *bytePtr = b 13 } 14 return err 15 }