json-number fixup

This commit is contained in:
John Kerl 2020-08-27 15:44:10 -04:00
parent 1f7f0ef723
commit 3a166ea667

View file

@ -6,7 +6,6 @@ import (
//"fmt"
"os"
//"reflect"
"strconv"
// Miller:
"miller/containers"
@ -84,9 +83,9 @@ func (this *RecordReaderJSON) Read(
if ok {
lrec.Put(&key, &sval)
} else {
nval, ok := value.(float64)
nval, ok := value.(json.Number)
if ok {
sval = strconv.FormatFloat(nval, 'g', -1, 64)
sval = nval.String()
lrec.Put(&key, &sval)
}
}