azos icon indicating copy to clipboard operation
azos copied to clipboard

Add JSON strict model binding: throw errors instead of using defaults

Open g8sun opened this issue 3 years ago • 1 comments

g8sun avatar Jun 28 '21 15:06 g8sun

See Jsonreader.cs:514

The strict: false is always like this ignoring [Action(strict)] controller pragma. This needs to be revised

//last resort
 try
 {
    return StringValueConversion.AsType(v.ToString(), toType, strict: false);
 }
 catch
 {
   return null;//the value could not be converted, and is going to go into amorphous bag if it is enabled
 }

zhabis avatar Jun 28 '21 23:06 zhabis