I am integrating some api and getting variant response for error field
{ "errors" : "amar"}
{ "errors" :["akbar"]}
{ "error" : "anthony"}
My error hnadling class have one property string Error
how can i de serialize in efficient way in that without try catch
I am using .net core 8.0
For array of string i can have comma separated errors
My model for class looks like below at the moment
public record ApiResponseError([property: JsonPropertyName("error")] string Error)