feat(binding): add UseNumber() in gin.Context.BindJSON() (#997) close #368

* resolve #368 add option to UseNumber() in gin.Context.BindJSON()

* add test
This commit is contained in:
whirosan
2017-07-10 17:33:35 +09:00
committed by Javier Provecho Fernandez
parent b6256dbe0c
commit fb7448f081
3 changed files with 18 additions and 1 deletions
+4
View File
@@ -64,6 +64,10 @@ func DisableBindValidation() {
binding.Validator = nil
}
func EnableJsonDecoderUseNumber() {
binding.EnableDecoderUseNumber = true
}
func Mode() string {
return modeName
}