GUID Problem (Create/Update)
See original GitHub issueHi;
I’m getting an error when Creating/Updating a form with a uniqueidentifier ID (GUID). The list handler works fine if I create a row directly from SQLServer. My Json (fiddler to the rescue:) ) looks something like this {“Entity”:{“xyzId”:“f78b4b2b-7ff2-4c3f-b984-55de933653cc”,“xyzField”:“125”,“TenantId”:1}}.
This is the error :
Details=System.FormatException: Unrecognized Guid format.
at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException)
at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result)
at System.Guid.Parse(String input)
at Serenity.Data.GuidField.ValueFromJson(JsonReader reader, Row row, JsonSerializer serializer) in C:\Projects\Serene\Serenity\Serenity.Data.Entity\FieldTypes\GuidField.cs:line 53
at Serenity.Data.JsonRowConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in C:\Projects\Serene\Serenity\Serenity.Data.Entity\Row\JsonRowConverter.cs:line 109
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Serenity.Services.JsonFilter.OnActionExecuting(ActionExecutingContext filterContext) in C:\Projects\Serene\Serenity\Serenity.Web\Mvc\JsonFilter.cs:line 55
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (13 by maintainers)

Top Related StackOverflow Question
Please update to 1.9.28, just found an error with JSON serialization, but it shouldn’t give error you wrote, should say something like SomeId field is required. Are you manually entering guids?
okay