(e *Encoder)
| 6460 | |
| 6461 | func (codecgenA) codecSelferViaCodecgen() {} |
| 6462 | func (x *codecgenA) CodecEncodeSelf(e *Encoder) { |
| 6463 | var h codecSelfer19780 |
| 6464 | z, r := GenHelper().Encoder(e) |
| 6465 | _, _, _ = h, z, r |
| 6466 | if z.EncBasicHandle().CheckCircularRef { |
| 6467 | z.EncEncode(x) |
| 6468 | return |
| 6469 | } |
| 6470 | if x == nil { |
| 6471 | r.EncodeNil() |
| 6472 | } else { |
| 6473 | yy2arr2 := z.EncBasicHandle().StructToArray |
| 6474 | _ = yy2arr2 |
| 6475 | const yyr2 bool = false // struct tag has 'toArray' |
| 6476 | if yyr2 || yy2arr2 { |
| 6477 | z.EncWriteArrayStart(1) |
| 6478 | z.EncWriteArrayElem() |
| 6479 | if x.ZZ == nil { |
| 6480 | r.EncodeNil() |
| 6481 | } else { |
| 6482 | r.EncodeStringBytesRaw([]byte(x.ZZ)) |
| 6483 | } // end block: if x.ZZ slice == nil |
| 6484 | z.EncWriteArrayEnd() |
| 6485 | } else { |
| 6486 | z.EncWriteMapStart(1) |
| 6487 | if z.EncBasicHandle().Canonical { |
| 6488 | z.EncWriteMapElemKey() |
| 6489 | if z.IsJSONHandle() { |
| 6490 | z.EncWr().WriteStr("\"ZZ\"") |
| 6491 | } else { |
| 6492 | r.EncodeString(`ZZ`) |
| 6493 | } |
| 6494 | z.EncWriteMapElemValue() |
| 6495 | if x.ZZ == nil { |
| 6496 | r.EncodeNil() |
| 6497 | } else { |
| 6498 | r.EncodeStringBytesRaw([]byte(x.ZZ)) |
| 6499 | } // end block: if x.ZZ slice == nil |
| 6500 | } else { |
| 6501 | z.EncWriteMapElemKey() |
| 6502 | if z.IsJSONHandle() { |
| 6503 | z.EncWr().WriteStr("\"ZZ\"") |
| 6504 | } else { |
| 6505 | r.EncodeString(`ZZ`) |
| 6506 | } |
| 6507 | z.EncWriteMapElemValue() |
| 6508 | if x.ZZ == nil { |
| 6509 | r.EncodeNil() |
| 6510 | } else { |
| 6511 | r.EncodeStringBytesRaw([]byte(x.ZZ)) |
| 6512 | } // end block: if x.ZZ slice == nil |
| 6513 | } |
| 6514 | z.EncWriteMapEnd() |
| 6515 | } |
| 6516 | } |
| 6517 | } |
| 6518 | |
| 6519 | func (x *codecgenA) CodecDecodeSelf(d *Decoder) { |
nothing calls this directly
no test coverage detected