| 115 | func (p *TJSONProtocol) WriteFieldStop(ctx context.Context) error { return nil } |
| 116 | |
| 117 | func (p *TJSONProtocol) WriteMapBegin(ctx context.Context, keyType TType, valueType TType, size int) error { |
| 118 | if e := p.OutputListBegin(); e != nil { |
| 119 | return e |
| 120 | } |
| 121 | s, e1 := p.TypeIdToString(keyType) |
| 122 | if e1 != nil { |
| 123 | return e1 |
| 124 | } |
| 125 | if e := p.WriteString(ctx, s); e != nil { |
| 126 | return e |
| 127 | } |
| 128 | s, e1 = p.TypeIdToString(valueType) |
| 129 | if e1 != nil { |
| 130 | return e1 |
| 131 | } |
| 132 | if e := p.WriteString(ctx, s); e != nil { |
| 133 | return e |
| 134 | } |
| 135 | if e := p.WriteI64(ctx, int64(size)); e != nil { |
| 136 | return e |
| 137 | } |
| 138 | return p.OutputObjectBegin() |
| 139 | } |
| 140 | |
| 141 | func (p *TJSONProtocol) WriteMapEnd(ctx context.Context) error { |
| 142 | if e := p.OutputObjectEnd(); e != nil { |