đī¸ Data Formats
The Game Jolt API can return data in multiple formats. You can specify the desired format by adding the format parameter to your request URL (e.g., ?format=json). If not specified, the default is json.
Supported formats:
- json: JSON object
- keypair: Key-value pairs
- dump: Simple line-based output
- xml: XML document
Example Usageâ
https://api.gamejolt.com/api/game/v1_2/?format=json
Format Examplesâ
- JSON
- Keypair
- Dump
- XML
{
"response": {
"success": "true",
"trophies": [
{
"id": "3",
"title": "Cookie Magnet",
"description": "Eat 10 points worth of cookies."
},
{
"id": "4",
"title": "I like this job!",
"description": "Eat 20 points worth of cookies."
}
]
}
}
success:"true"
id:"3"
title:"Cookie Magnet"
description:"Eat 10 points worth of cookies."
difficulty:"Bronze"
image_url:"https://i.gjcdn.net/imgserver/game-trophy/75/1958_1.jpg"
achieved:"1 month ago"
id:"4"
title:"I like this job!"
description:"Eat 20 points worth of \"cookies\"."
difficulty:"Bronze"
image_url:"https://i.gjcdn.net/imgserver/game-trophy/75/1958_1.jpg"
achieved:"false"
SUCCESS
First data item
Second data item
Third data item
...
<?xml version="1.0" encoding="UTF-8"?>
<response>
<success>
<![CDATA[true]]>
</success>
<trophies>
<trophy>
<id>3</id>
<title><![CDATA[Cookie Magnet]]></title>
<description><![CDATA[Eat 10 points worth of cookies.]]></description>
</trophy>
<trophy>
<id>4</id>
<title><![CDATA[I like this job!]]></title>
<description><![CDATA[Eat 20 points worth of cookies.]]></description>
</trophy>
</trophies>
</response>
For more details, see the official documentation and the subpages for each format: JSON, Keypair, Dump, XML.