Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Conversation

@nqztv
Copy link

@nqztv nqztv commented Jul 27, 2017

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.

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.
@ghost
Copy link

ghost commented Aug 2, 2017

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.

@nqztv
Copy link
Author

nqztv commented Aug 4, 2017

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?

@ghost ghost mentioned this pull request Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant