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

Method codecDecodeSelfFromMap

benchmark/benchmark_codecgen.go:1873–1903  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(l int, d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

1871
1872// Benchmark harness support for STK-REQ-004.
1873func (x *DSUser) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
1874 var h codecSelfer6617
1875 z, r := codec1978.GenHelperDecoder(d)
1876 _, _, _ = h, z, r
1877 var yyhl3 bool = l >= 0
1878 for yyj3 := 0; ; yyj3++ {
1879 if yyhl3 {
1880 if yyj3 >= l {
1881 break
1882 }
1883 } else {
1884 if r.CheckBreak() {
1885 break
1886 }
1887 }
1888 r.ReadMapElemKey()
1889 yys3 := z.StringView(r.DecodeStringAsBytes())
1890 r.ReadMapElemValue()
1891 switch yys3 {
1892 case "Username":
1893 if r.TryDecodeAsNil() {
1894 x.Username = ""
1895 } else {
1896 x.Username = (string)(r.DecodeString())
1897 }
1898 default:
1899 z.DecStructFieldNotFound(-1, yys3)
1900 } // end switch yys3
1901 } // end for yyj3
1902 r.ReadMapEnd()
1903}
1904
1905// Benchmark harness support for STK-REQ-004.
1906func (x *DSUser) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {

Callers 1

CodecDecodeSelfMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected