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

Method OutputPreValue

lib/go/thrift/simple_json_protocol.go:624–640  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

622}
623
624func (p *TSimpleJSONProtocol) OutputPreValue() error {
625 cxt, ok := p.dumpContext.peek()
626 if !ok {
627 return errEmptyJSONContextStack
628 }
629 switch cxt {
630 case _CONTEXT_IN_LIST, _CONTEXT_IN_OBJECT_NEXT_KEY:
631 if _, e := p.write(JSON_COMMA); e != nil {
632 return NewTProtocolException(e)
633 }
634 case _CONTEXT_IN_OBJECT_NEXT_VALUE:
635 if _, e := p.write(JSON_COLON); e != nil {
636 return NewTProtocolException(e)
637 }
638 }
639 return nil
640}
641
642func (p *TSimpleJSONProtocol) OutputPostValue() error {
643 cxt, ok := p.dumpContext.peek()

Callers 9

WriteBinaryMethod · 0.95
OutputBoolMethod · 0.95
OutputNullMethod · 0.95
OutputF64Method · 0.95
OutputI64Method · 0.95
OutputStringMethod · 0.95
OutputObjectBeginMethod · 0.95
OutputListBeginMethod · 0.95
WriteBinaryMethod · 0.80

Calls 3

writeMethod · 0.95
NewTProtocolExceptionFunction · 0.85
peekMethod · 0.45

Tested by

no test coverage detected