(m *Map, oid uint32, format int16, value any)
| 19 | } |
| 20 | |
| 21 | func (c *JSONBCodec) PlanEncode(m *Map, oid uint32, format int16, value any) EncodePlan { |
| 22 | switch format { |
| 23 | case BinaryFormatCode: |
| 24 | plan := (&JSONCodec{Marshal: c.Marshal, Unmarshal: c.Unmarshal}).PlanEncode(m, oid, TextFormatCode, value) |
| 25 | if plan != nil { |
| 26 | return &encodePlanJSONBCodecBinaryWrapper{textPlan: plan} |
| 27 | } |
| 28 | case TextFormatCode: |
| 29 | return (&JSONCodec{Marshal: c.Marshal, Unmarshal: c.Unmarshal}).PlanEncode(m, oid, format, value) |
| 30 | } |
| 31 | |
| 32 | return nil |
| 33 | } |
| 34 | |
| 35 | type encodePlanJSONBCodecBinaryWrapper struct { |
| 36 | textPlan EncodePlan |
nothing calls this directly
no test coverage detected