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
Hello, while using DeviantArtFs.Api.Browse.PageNewestAsync method I have noticed that there is an inconsisency in returned deviation objects which results in the following error:
FSharp.Json.JsonDeserializationError: JSON Path: results[117].tier.stats. Failed to parse record from JSON that is not object.
at FSharp.Json.Core.failDeserialization[a](JsonPath path, String message)
at FSharp.Json.Core.deserializeRecord@463(JsonConfig config, JsonPath path, Type t, JsonValue jvalue)
at FSharp.Json.Core.deserializeNonOption@322(JsonConfig config, JsonPath path, Type t, JsonField jsonField, JsonValue jvalue)
at FSharp.Json.Core.deserializeUnwrapOption@376(JsonConfig config, JsonPath path, Type t, JsonField jsonField, FSharpOption`1 jvalue)
at FSharp.Json.Core.deserializeRecord@463(JsonConfig config, JsonPath path, Type t, JsonValue jvalue)
at FSharp.Json.Core.deserializeNonOption@322(JsonConfig config, JsonPath path, Type t, JsonField jsonField, JsonValue jvalue)
at FSharp.Json.Core.deserializeUnwrapOption@376(JsonConfig config, JsonPath path, Type t, JsonField jsonField, FSharpOption`1 jvalue)
at FSharp.Json.Core.deserializeRecord@463(JsonConfig config, JsonPath path, Type t, JsonValue jvalue)
at FSharp.Json.Core.deserializeNonOption@322(JsonConfig config, JsonPath path, Type t, JsonField jsonField, JsonValue jvalue)
at Microsoft.FSharp.Collections.ArrayModule.MapIndexed[T,TResult](FSharpFunc`2 mapping, T[] array) in D:\a\_work\1\s\src\FSharp.Core\array.fs:line 453
at FSharp.Json.Core.deserializeList@420(JsonConfig config, JsonPath path, Type t, JsonValue jvalue)
at FSharp.Json.Core.deserializeNonOption@322(JsonConfig config, JsonPath path, Type t, JsonField jsonField, JsonValue jvalue)
at FSharp.Json.Core.deserializeRecord@463(JsonConfig config, JsonPath path, Type t, JsonValue jvalue)
at FSharp.Json.Json.deserializeEx[T](JsonConfig config, String json)
at DeviantArtFs.Utils.thenMap@100.MoveNext()
As you can see, despite documentation mentioning it can only be an object, for some reason they are returning array for stats and I guess that's why deserialization error is happening. I have also tested this with /deviation/#GUID# endpoint and it returns the same out of spec object, so this seems to be an issue in all of their api endpoints which return deviation object.
I'm not sure if you can do something about that, but I thought it's worth letting you know about this issue.
The text was updated successfully, but these errors were encountered:
Whatever serializer DeviantArt uses must (at least sometimes) render empty objects {} as empty arrays [] - I'm guessing whatever langauge they use on the backend doesn't distinguish between those two. I remember having an issue like that before.
I might just remove tier.stats from the model and add a note about it, unless you (or someone else) needs to use that for something.
Hello, while using
DeviantArtFs.Api.Browse.PageNewestAsync
method I have noticed that there is an inconsisency in returned deviation objects which results in the following error:Here is the problematic
tier
object in question:As you can see, despite documentation mentioning it can only be an object, for some reason they are returning array for
stats
and I guess that's why deserialization error is happening. I have also tested this with/deviation/#GUID#
endpoint and it returns the same out of spec object, so this seems to be an issue in all of their api endpoints which returndeviation
object.I'm not sure if you can do something about that, but I thought it's worth letting you know about this issue.
The text was updated successfully, but these errors were encountered: