Keypair & Dump Data Format Implementation
WinterBlox opened this issue · 1 comments
While you can already receive data from GameJolt in JSON (Javascript Object Notation) Format, responses also support 3 other formats: Keypair, Dump and XML (Extensible Markup Language).
Keypair responses are simple in that they are sent as a multi-line string of keys (labels) paired with a value. Essentially, it's JSON but simpler. (This used to be the default format for API Responses, but this was later changed to JSON.)
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"
Dump responses are even simpler in that they don't use labels like Keypair and JSON. It is exactly what it sounds like: A dump of unlabelled values to read from.
SUCCESS
First data item
Second data item
Third data item
...
If a failed request uses the Dump Format, then the response will be different:
FAILURE
The game ID you passed in does not point to a valid game.
FrostJolt v1.0.0 is planned to have support for both Keypair and Dump, but not XML.
really old idea and im not good enough with GML to program that kind of functionality in yet, besides JSON is way more prevalent than either Keypair or Dump so it shouldn't be too much of a big deal