OneDrive / onedrive-sdk-csharp

OneDrive SDK for C#! https://dev.onedrive.com
Other
293 stars 143 forks source link

Invalid property identifier character. #257

Closed otamendy-at-iurem closed 1 month ago

otamendy-at-iurem commented 11 months ago

Hi there,

I'm having parsing error during the deserialization of responses for some requests, in concrete:

            await _client!
                .Drive
                .Items[createdFolder!.Id]
                .Invite(roles, users.ToArray(), false, true)
                .Request()
                .PostAsync();

and

            await _client!
                .Drive
                .Items[externalId]
                .CreateLink("view")
                .Request()
                .PostAsync();

in the first case it's ok for me because I don't use the response but I need the link for the second one, here is the error: Invalid property identifier character: {. Path '', line 1, position 1. and the stacktrace:

   at Newtonsoft.Json.JsonTextReader.ParseProperty()
   at Newtonsoft.Json.JsonTextReader.ParseObject()
   at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader)
   at Microsoft.Graph.DerivedTypeConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, 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 Microsoft.Graph.Serializer.DeserializeObject[T](String inputString)
   at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
   at Infrastructure.Services.Integrations.OneDrive.OneDriveFileManagerServices.GetUrl(String externalId, String databaseName) in Infrastructure/Services/Integrations/OneDrive/OneDriveFileManagerServices.cs:line 225

I hope you can help me here

baywet commented 1 month ago

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #259 for more information