madcowfred / padherder-issues

PADherder issues only
34 stars 9 forks source link

JSON import - JP 7.8.1 changed JSON format #643

Closed icijunk closed 9 years ago

icijunk commented 9 years ago

Import JSON from JP 7.8.1 errors out. I used Charles proxy to pull the get_player_data response out, and have been importing for a year successfully before that.

They seemed to have switched from a JSON array to a JSON list of lists for the "card" section.

New format: "card": [ [1, 154906, 40, 1, 42, 1919, 0, 0, 0, 3, 0], [8, 2422201, 81, 1, 29, 1216, 2, 1, 0, 4, 0],

Old format: "card": [{ "cuid": 1, "exp": 79875, "lv": 31, "slv": 1, "mcnt": 40, "no": 4, "plus": [0, 0, 0, 3, 0] }, { "cuid": 8, "exp": 2386638, "lv": 80, "slv": 1, "mcnt": 28, "no": 629, "plus": [2, 1, 0, 4, 0] }, {

madcowfred commented 9 years ago

Ah, that explains the error emails I've been getting. It looks like:

[cuid, exp, lv, slv, mcnt, no, plus0, plus1, plus2, plus3, plus4]

... and I'll add support for that.

madcowfred commented 9 years ago

I've added support for this but can't really test it, hopefully it works.

icijunk commented 9 years ago

Works great. Thanks!