View Single Post
Old 01-31-2015, 07:29 PM   #13
llyair
Wiki Staff
Retired StaffFFR Veteran
 
llyair's Avatar
 
Join Date: Jun 2014
Posts: 307
Default Re: [API] FFR API Beta

Hi again (: I'm using the JSON values returned, I don't know if it's just me, but I'm getting that song names <2008> and <00.01> are coming back as integers while the others are strings. And in the case of <00.01>, the song name is actually (truncated?) to simply 0.

"info":{...
"name":2008
...}

"info":{...
"name":0
...}

I guess I just ran into this now and it crashed my program (typechecking threw an error), so I wanted to bring it up as an fyi to anyone else who might run into the same thing ^^ I'm not familiar with handling JSON or even xml data in general, though, so maybe it's just me?

But I added a check for integers, which works fine, and I just need to assume that when I see the song 0 it means 00.01. Sooo yep, just wanted to put this out there~

EDIT1:
Ohh okay I just checked the xml, it has ![CDATA[ 2008 ]] and ![CDATA[ 00.01 ]], which I think is expected... maybe I should switch ^^

EDIT2:
Lol not to make this point ad nauseam, either, but since I'm here anyways, here's a list c:

"136.6" --> 136
"20031023" --> 20031023
"300" --> 300
"3020" --> 3020

Last edited by llyair; 01-31-2015 at 07:53 PM..
llyair is offline   Reply With Quote