()
| 622 | } |
| 623 | |
| 624 | func (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 | |
| 642 | func (p *TSimpleJSONProtocol) OutputPostValue() error { |
| 643 | cxt, ok := p.dumpContext.peek() |
no test coverage detected