MCPcopy Create free account
hub / github.com/apache/thrift / WriteMapBegin

Method WriteMapBegin

lib/go/thrift/simple_json_protocol.go:258–269  ·  view source on GitHub ↗
(ctx context.Context, keyType TType, valueType TType, size int)

Source from the content-addressed store, hash-verified

256func (p *TSimpleJSONProtocol) WriteFieldStop(ctx context.Context) error { return nil }
257
258func (p *TSimpleJSONProtocol) WriteMapBegin(ctx context.Context, keyType TType, valueType TType, size int) error {
259 if e := p.OutputListBegin(); e != nil {
260 return e
261 }
262 if e := p.WriteByte(ctx, int8(keyType)); e != nil {
263 return e
264 }
265 if e := p.WriteByte(ctx, int8(valueType)); e != nil {
266 return e
267 }
268 return p.WriteI32(ctx, int32(size))
269}
270
271func (p *TSimpleJSONProtocol) WriteMapEnd(ctx context.Context) error {
272 return p.OutputListEnd()

Callers 1

Calls 3

OutputListBeginMethod · 0.95
WriteByteMethod · 0.95
WriteI32Method · 0.95

Tested by 1