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

Method OutputPostValue

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

Source from the content-addressed store, hash-verified

640}
641
642func (p *TSimpleJSONProtocol) OutputPostValue() error {
643 cxt, ok := p.dumpContext.peek()
644 if !ok {
645 return errEmptyJSONContextStack
646 }
647 switch cxt {
648 case _CONTEXT_IN_LIST_FIRST:
649 p.dumpContext.pop()
650 p.dumpContext.push(_CONTEXT_IN_LIST)
651 case _CONTEXT_IN_OBJECT_FIRST:
652 p.dumpContext.pop()
653 p.dumpContext.push(_CONTEXT_IN_OBJECT_NEXT_VALUE)
654 case _CONTEXT_IN_OBJECT_NEXT_KEY:
655 p.dumpContext.pop()
656 p.dumpContext.push(_CONTEXT_IN_OBJECT_NEXT_VALUE)
657 case _CONTEXT_IN_OBJECT_NEXT_VALUE:
658 p.dumpContext.pop()
659 p.dumpContext.push(_CONTEXT_IN_OBJECT_NEXT_KEY)
660 }
661 return nil
662}
663
664func (p *TSimpleJSONProtocol) OutputBool(value bool) error {
665 if e := p.OutputPreValue(); e != nil {

Callers 9

WriteBinaryMethod · 0.95
OutputBoolMethod · 0.95
OutputNullMethod · 0.95
OutputF64Method · 0.95
OutputI64Method · 0.95
OutputStringMethod · 0.95
OutputObjectEndMethod · 0.95
OutputListEndMethod · 0.95
WriteBinaryMethod · 0.80

Calls 3

peekMethod · 0.45
popMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected