diff --git a/encoder.go b/encoder.go index be69046..e697fe1 100644 --- a/encoder.go +++ b/encoder.go @@ -2,7 +2,6 @@ package xml2json import ( "bytes" - "fmt" "io" "unicode/utf8" ) @@ -102,7 +101,6 @@ func (enc *Encoder) format(n *Node, lvl int) error { if enc.tc == nil { // do nothing } else { - fmt.Println(s) s = enc.tc.Convert(s) } enc.write(s) diff --git a/jstype.go b/jstype.go index cfbf3b7..bd08245 100644 --- a/jstype.go +++ b/jstype.go @@ -52,10 +52,10 @@ func isFloat(s string) bool { func isInt(s string) bool { var output = false - if len(s) > 1 { + if len(s) >= 1 { _, err := strconv.Atoi(s) if err == nil { // the string successfully converts to an int - if s[0] == '0' { + if s != "0" && s[0] == '0' { // if the first rune is '0' and there is more than 1 rune, then the input is most likely a float or intended to be // a string value -- such as in the case of a guid, or an international phone number } else {