explicitly check for float64

This commit is contained in:
Sam Woodard 2015-07-08 13:14:14 -07:00
parent c887cfc585
commit beb1f77731
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ func unmarshalJsonApiNode(data *JsonApiNode, model reflect.Value) error {
return false
}
if fieldValue.Kind() == reflect.Int && v.Kind() != reflect.Int {
if fieldValue.Kind() == reflect.Int && v.Kind() == reflect.Float64 {
fieldValue.Set(reflect.ValueOf(int(v.Interface().(float64))))
} else {
fieldValue.Set(reflect.ValueOf(val))