Arnold0 wrote:
...
Oh wow lol. "A JSON list containing user information" on the GitHub wiki should have given you a clue though
JSON is an international standard to easily encode and send data throughout webpages. It's especially used in Javascript/AJAX. Here are some var_dumps to make you understand:
Without json_decode, you get:
string '[{"user_id":"1428609","username":"Arnold0","count300":"1953","count100":"318","count50":"2933","playcount":"11","ranked_score":"1412132","total_score":"2437922","pp_rank":"276967","level":"7.29994","pp_raw":"9.05734","accuracy":"98.76","country":"FR"}]' (length=252)
With json_decode, you get:
array (size=1)
0 =>
array (size=13)
'user_id' => string '1428609' (length=7)
'username' => string 'Arnold0' (length=7)
'count300' => string '1953' (length=4)
'count100' => string '318' (length=3)
'count50' => string '2933' (length=4)
'playcount' => string '11' (length=2)
'ranked_score' => string '1412132' (length=7)
'total_score' => string '2437922' (length=7)
'pp_rank' => string '276967' (length=6)
'level' => string '7.29994' (length=7)
'pp_raw' => string '9.05734' (length=7)
'accuracy' => string '98.76' (length=5)
'country' => string 'FR' (length=2)
Arnold0 wrote:
I didn't know that osu!api delete the last 2 (or 4 in case of 100%) useless digit of accuracy.
iirc PHP or MySQL does that automatically.