We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1ad219 commit b8c45d0Copy full SHA for b8c45d0
bat.go
@@ -17,6 +17,7 @@
17
package main
18
19
import (
20
+ "bytes"
21
"crypto/tls"
22
"encoding/json"
23
"flag"
@@ -33,7 +34,7 @@ import (
33
34
"strings"
35
)
36
-const version = "0.0.3"
37
+const version = "0.1.0"
38
39
var (
40
ver bool
@@ -163,7 +164,9 @@ func main() {
163
164
}
165
if len(stdin) > 0 {
166
var j interface{}
- err = json.Unmarshal(stdin, &j)
167
+ d := json.NewDecoder(bytes.NewReader(stdin))
168
+ d.UseNumber()
169
+ err = d.Decode(&j)
170
if err != nil {
171
httpreq.Body(stdin)
172
} else {
0 commit comments