We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When calling ManagementApiClient.CustomDomains.GetAllAsync(), I get the following error:
ManagementApiClient.CustomDomains.GetAllAsync()
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path '[0].verification.methods', line 1, position 174. 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.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) 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.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.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.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) 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 Auth0.ManagementApi.HttpClientManagementConnection.SendRequest[T](HttpRequestMessage request, JsonConverter[] converters) at Auth0.ManagementApi.HttpClientManagementConnection.GetAsync[T](Uri uri, IDictionary`2 headers, JsonConverter[] converters) ...
This is likely caused by the incorrect type of the CustomDomainVerification.Methods property:
CustomDomainVerification.Methods
auth0.net/src/Auth0.ManagementApi/Models/CustomDomainVerification.cs
Line 14 in 4089729
When I try to get the custom domains from API explorer, I get a success response, but the items are not strings in the methods array:
{ ... "verification": { "methods": [ { "name": "cname", "record": "..." } ] }, ... }
Methods array should be either a dynamic[] array, or if the schema is known, an array of a strongly typed class.
Methods
dynamic[]
"read:custom_domains"
ManagementApiClient
The text was updated successfully, but these errors were encountered:
Thanks for reporting this, this appears to be a bug indeed!
Sorry, something went wrong.
Ensure CustomDomainVerification.Methods can be serialized
e49bf82
Fix #508
I added a PR, feel free to give it a spin to verify it works in your situation as well.
Thank you, it looks fine to me.
Ensure CustomDomainVerification.Methods can be serialized (#509)
c03e292
Successfully merging a pull request may close this issue.
Describe the problem
When calling
ManagementApiClient.CustomDomains.GetAllAsync()
, I get the following error:This is likely caused by the incorrect type of the
CustomDomainVerification.Methods
property:auth0.net/src/Auth0.ManagementApi/Models/CustomDomainVerification.cs
Line 14 in 4089729
When I try to get the custom domains from API explorer, I get a success response, but the items are not strings in the methods array:
What was the expected behavior?
Methods
array should be either adynamic[]
array, or if the schema is known, an array of a strongly typed class.Reproduction
"read:custom_domains"
permissionManagementApiClient
with the tokenManagementApiClient.CustomDomains.GetAllAsync()
Environment
The text was updated successfully, but these errors were encountered: