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

Method ParseF64

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

Source from the content-addressed store, hash-verified

1010}
1011
1012func (p *TSimpleJSONProtocol) ParseF64() (float64, bool, error) {
1013 if err := p.ParsePreValue(); err != nil {
1014 return 0, false, err
1015 }
1016 var value float64
1017 var isnull bool
1018 if p.safePeekContains(JSON_NULL) {
1019 p.reader.Read(make([]byte, len(JSON_NULL)))
1020 isnull = true
1021 } else {
1022 num, err := p.readNumeric()
1023 isnull = (num == nil)
1024 if !isnull {
1025 value = num.Float64()
1026 }
1027 if err != nil {
1028 return value, isnull, err
1029 }
1030 }
1031 return value, isnull, p.ParsePostValue()
1032}
1033
1034func (p *TSimpleJSONProtocol) ParseObjectStart() (bool, error) {
1035 if err := p.ParsePreValue(); err != nil {

Callers 2

ReadDoubleMethod · 0.95
ReadDoubleMethod · 0.80

Calls 6

ParsePreValueMethod · 0.95
safePeekContainsMethod · 0.95
readNumericMethod · 0.95
ParsePostValueMethod · 0.95
ReadMethod · 0.65
Float64Method · 0.65

Tested by

no test coverage detected