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'm sending a GET request to the Web API. If the first character in the value string is any of:
[{"
The query fails. Sample strings causing the problem:
asd"asd
[test
{asd
I get the error:
[21:42:40 ERR] Unexpected character encountered while parsing value: [. Path 'name', line 1, position 35.
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: [. Path 'name', line 1, position 35.
at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ReadAsString()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
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 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Open.Serialization.Json.Newtonsoft.JsonSerializerInternal.Deserialize[T](String value)
at Convey.WebApi.Extensions.ReadQuery[T](HttpContext context)
at Convey.WebApi.EndpointsBuilder.BuildQueryContext[T](HttpContext httpContext, Func3 context, Action1 endpoint)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Convey.WebApi.Exceptions.ErrorHandlerMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
There seems to be something wrong with replace here:
I'm sending a GET request to the Web API. If the first character in the value string is any of:
The query fails. Sample strings causing the problem:
I get the error:
There seems to be something wrong with replace here:
Convey/src/Convey.WebApi/src/Convey.WebApi/Extensions.cs
Line 365 in fce2ced
The text was updated successfully, but these errors were encountered: