JSON Feed constantly changing?

Subscribe to JSON Feed constantly changing? 3 posts

Sign in to reply


 
avatar for UnknownGuardian UnknownGuardian 6220 posts
Flag Post

I downloaded the sample JSON feed produced by jimgreer in the programming forum a few weeks ago, and have not made any edits to it. Now, I checked it again, and it has changed. And when I retrieve it with code, its somehow changes as well. I will post the first entry from each one.

One downloaded a few weeks ago


[{"description":"Get 500 kills with headshots during a single game
","games":[{"url":"http:\/\/www.kongregate.com\/games\/ConArtis
ts\/the-last-stand","title":"The Last Stand"}],"name":"Sniper","icon
_url":"http:\/\/cdn4.kongregate.com\/badge_icons\/0000\/0001\/th
elaststand_sniper.png?1242937018","users_count":45363,"difficulty
":"hard","created_at":"2007/06/26 23:06:49 -0700","points":30,"id"
:1}

The one I downloaded recently


[{"description":"Get 500 kills with headshots during a single game
","games":[{"url":"http:\/\/www.kongregate.com\/games\/ConArtis
ts\/the-last-stand","title":"The Last Stand"}],"name":"Sniper","us
ers_count":45489,"points":30,"icon_url":"http:\/\/cdn4.kongregate
.com\/badge_icons\/0000\/0001\/thelaststand_sniper.png?12429
37018","created_at":"2007/06/26 23:06:49 -0700","id":1,"difficulty
":"hard"}

And the one my code retrieves(sometimes)

[{"description":"Get 500 kills with headshots during a single game
","games":[{"url":"http:\/\/www.kongregate.com\/games\/ConArtis
ts\/the-last-stand","title":"The Last Stand"}],"name":"Sniper","us
ers_count":45489,"points":30,"icon_url":"http:\/\/cdn4.kongregate
.com\/badge_icons\/0000\/0001\/thelaststand_sniper.png?12429
37018","created_at":"2007/06/26 23:06:49 -0700","difficulty":"hard","id"
:1},{"

Notice the position of “difficulty” and “id”. In all three they are different

Possible server inconsistency?

 
avatar for Ventero Ventero 1968 posts
Flag Post

And where’s the problem? It’s JSON after all, you’re not supposed to parse it as a string, but as an object.
So the position of the difficulty and id in the JSON-string are completely irrelevant…
And if I compare the resulting objects when parsing those JSON-strings you posted there, all three are equal.

 
avatar for UnknownGuardian UnknownGuardian 6220 posts
Flag Post

Ohh…So when I load it, the JSON is already divided as an object? That makes things MUCH easier. Thanks!

Sign in to reply