You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried to use your code in .NET Core 3.1 but it was not working. I've received 400 Bad Request. I've found out that the Id was missing in the serialized object.
The fix is simple. In the AnnotationModel, I've changed public Guid Id = Guid.NewGuid(); to public Guid Id { get; set; } = Guid.NewGuid(); and it worked.
Of course, I've use the System.Text.Json.JsonSerializer class to serialize. It is different from the JavaScriptSerializer used in this repo.
The text was updated successfully, but these errors were encountered:
Hello,
I've tried to use your code in .NET Core 3.1 but it was not working. I've received 400 Bad Request. I've found out that the Id was missing in the serialized object.
The fix is simple. In the AnnotationModel, I've changed
public Guid Id = Guid.NewGuid();
topublic Guid Id { get; set; } = Guid.NewGuid();
and it worked.Of course, I've use the
System.Text.Json.JsonSerializer
class to serialize. It is different from theJavaScriptSerializer
used in this repo.The text was updated successfully, but these errors were encountered: