Hi gophers, How to prevent json unmarshal from type conversion. From the below sample code i got the input string converted to float64
package main import ( "fmt" "encoding/json" "reflect" ) func main() { var output interface{} var input = "1" fmt.Println(reflect.TypeOf(input)) json.Unmarshal([]byte(input), &output) fmt.Println(reflect.TypeOf(output)) } -- ------------------------------ IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its content are confidential to the intended recipient. If you are not the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. It may not be disclosed to or used by anyone other than its intended recipient, nor may it be copied in any way. If received in error, please email a reply to the sender, then delete it from your system. Although this e-mail has been scanned for viruses, HiFX cannot ultimately accept any responsibility for viruses and it is your responsibility to scan attachments (if any). Before you print this email or attachments, please consider the negative environmental impacts associated with printing. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.