You are not signed in. Log in or Register

API bug

3 post(s), 2 voice(s)


While trying to make a web page using the z33k API, I discovered that the JSON syntax seems to be incorrect on certain items. Such as the code posted here:

I may be mistaken but it seems to only be on the tournaments part of the API in most of the places there needs to be a [ and a {.

Derek “PuzzledPlane”

Lux 569 post(s)

Hey puzzledplane,

Thanks for the report. In JSON square brackets [] denote an array, whereas curly braces {} denote key value pairs, sometimes called a hash or set or dictionary. Here is a short example of how you might access the values.

The places we use key value pairs instead of arrays is by design, and it should pass JSONLint test: In the case you posted the order of the attributes, such as “players_checked_in” or “short_url” do not matter, and it is easier to access by name


if it were in an array, let’s say the way you had posted it, it would be accessed like this:

result[“tournament”][ 2]

Let me know if you have any other questions or feature requests for the API.

Hmm interesting. Now I just need to figure out how to query the tournaments part of the array to pull that info in PHP. Sorry for the seemingly wrong report now.

Derek “Puzzledplane”