MCPcopy Create free account
hub / github.com/buger/jsonparser / codecDecodeSelfFromMap

Method codecDecodeSelfFromMap

benchmark/benchmark_codecgen.go:818–851  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(l int, d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

816
817// Benchmark harness support for STK-REQ-004.
818func (x *CBGravatar) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
819 var h codecSelfer6617
820 z, r := codec1978.GenHelperDecoder(d)
821 _, _, _ = h, z, r
822 var yyhl3 bool = l >= 0
823 for yyj3 := 0; ; yyj3++ {
824 if yyhl3 {
825 if yyj3 >= l {
826 break
827 }
828 } else {
829 if r.CheckBreak() {
830 break
831 }
832 }
833 r.ReadMapElemKey()
834 yys3 := z.StringView(r.DecodeStringAsBytes())
835 r.ReadMapElemValue()
836 switch yys3 {
837 case "Avatars":
838 if r.TryDecodeAsNil() {
839 x.Avatars = nil
840 } else {
841 if false {
842 } else {
843 h.decSlicePtrtoCBAvatar((*[]*CBAvatar)(&x.Avatars), d)
844 }
845 }
846 default:
847 z.DecStructFieldNotFound(-1, yys3)
848 } // end switch yys3
849 } // end for yyj3
850 r.ReadMapEnd()
851}
852
853// Benchmark harness support for STK-REQ-004.
854func (x *CBGravatar) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {

Callers 1

CodecDecodeSelfMethod · 0.95

Calls 1

decSlicePtrtoCBAvatarMethod · 0.95

Tested by

no test coverage detected