Reading methods.
(ctx context.Context)
| 347 | |
| 348 | // Reading methods. |
| 349 | func (p *TSimpleJSONProtocol) ReadMessageBegin(ctx context.Context) (name string, typeId TMessageType, seqId int32, err error) { |
| 350 | p.resetContextStack() // THRIFT-3735 |
| 351 | if isNull, err := p.ParseListBegin(); isNull || err != nil { |
| 352 | return name, typeId, seqId, err |
| 353 | } |
| 354 | if name, err = p.ReadString(ctx); err != nil { |
| 355 | return name, typeId, seqId, err |
| 356 | } |
| 357 | bTypeId, err := p.ReadByte(ctx) |
| 358 | typeId = TMessageType(bTypeId) |
| 359 | if err != nil { |
| 360 | return name, typeId, seqId, err |
| 361 | } |
| 362 | if seqId, err = p.ReadI32(ctx); err != nil { |
| 363 | return name, typeId, seqId, err |
| 364 | } |
| 365 | return name, typeId, seqId, nil |
| 366 | } |
| 367 | |
| 368 | func (p *TSimpleJSONProtocol) ReadMessageEnd(ctx context.Context) error { |
| 369 | return p.ParseListEnd() |
nothing calls this directly
no test coverage detected