isaacschemm / deviantartfs Goto Github PK
View Code? Open in Web Editor NEWF# library for the DeviantArt and Sta.sh API
License: Other
F# library for the DeviantArt and Sta.sh API
License: Other
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 [email protected]()
Here is the problematic tier
object in question:
"tier": {
"state": "active",
"is_user_subscribed": false,
"can_user_subscribe": true,
"subproductid": 569102470,
"dollar_price": "5.00",
"settings": {
"access_settings": "all"
},
"stats": [],
"benefits": [
"Welcome Gift!",
"Early Access to New Work",
"Over 2k Resolution Images"
]
},
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.