Stopgap for Smash.gg Import function#13
Conversation
According to Smashboards user Demandatwin, these are the offending properties. ThreeFold changed bool to object, while Demandatwin changed the bool to string. Might just need to change all bool properties if we're not using the JSON.NET package to deserialize. But since the smash.gg API will probably change again and break things, this is just a stopgap.
|
Yeah, I made it "work" on my local branch, but Smash.gg might change their API at any time, so what I would recommend for now is changing it so that it doesn't crash, but doesn't accept the incoming json file if it can't read it. I'll need to add that try/catch block. Something I also should plan on is add proper logging. But for me getting it working is the most critical thing. |
|
ya, this is just a stopgap. i think it should be merged so there isn't a version that crashes on the master branch. if we don't accept the incoming json file, isn't that the same as smash.gg importing not working? while we could use something like json2csharp to update our object everytime smash.gg's api changes, shouldn't we just not strongly type anything until smash.gg starts versioning their apis or something (so that we know we're getting consistent output)? also, are we trying to avoid using packages like json.net? |
According to Smashboards user Demandatwin, these are the offending properties: https://smashboards.com/threads/skillkeeper-trueskill%E2%84%A2-rankings-bookkeeper.376590/page-8#post-21741867. While Demandatwin changed the bool to string to fix the importing on his local repo, ThreeFold changes the bool to object to fix the errors in deserializing the JSON to bool. Went with ThreeFold's way since he's more likely to contribute to this project. Might just need to change all bool properties if we're not using the JSON.NET package to deserialize. But since the smash.gg API will probably change again and break things, this is just a stopgap.