Data Types

A note on json files

A .JSON file is just a text document which is formatted in a way that's easy for computers to read.

Because of this, there are several "rules" that you have to follow, else what you've written won't be comprehensible.


String

A String is a word, or a collection of letters.

Strings must be surrounded by Quotation marks.


      ""
      "Cat"
      "strings can be of any length, and can contain spaces."
      "they also have to be 1 line long. Use \n to display a new line and use \" to show a quotation mark"
      

Cardname

This is just a String which has an exact yugioh card name (including punctuation)

The "exact" card name is whatever the ydkapi says it is (use this tool to see what is legal)

Quotation marks in card names must use escape characters, like in strings (see examples below)

The game's card database will never be 100% up-to-date. Please be patient to see the inclusion of very new cards.


      "Kuriboh"
      "Dark Magician"
      "Karakuri Watchdog mdl 313 \"Saizan\""
      

EventID

This is just a String which corresponds to the ID of one of your events in events.JSON.

As with all Strings, this is case-sensitive.


            "booster"
            "level_1"
            "fireMonsters"
          

typeId

This is just a String which corresponds to the Type and ID of an event in your events.JSON.

Type:ID must be separated by a colon, but the entire term is a single string.


            "pick:booster"
            "area: level_1"
            "pack : fireMonsters"
          

Number

A Number is any number, including negative and decimal (floating point) numbers.

Numbers must not be surrounded by anything.


          0
          -2
          3.4
          348067159761
          

Int / Integer

An Int is a whole number.

Numbers must not be surrounded by anything.


          0
          -1
          234
          56789
          


Boolean

A Boolean must be either true or false.

Due to the nature of the programming language used to make the App, other values might equate to true or false. However, it is recommended that you only use the terms true and false.

Since a Boolean is not a string, you must not surround it by quotation marks.


      true
      false
      

Array

An array is a list of any number of data types.

Arrays must be surrounded by square brackets. Elements of an array must be separated by a comma.


      []
      ["Cat", "dog"]
      [1, 2, 3, 4, 5]
      [ ["Array within an array, containing a string"], ["Another Array within an array, containing a string"] ]
      

Object / Key-Value-Pair

An Object is a data type which contains other data types.

Objects must be surrounded by curly brackets.

In actual coding, you'll often see this described as a "key-value pair".

The "key" and the "value" are separated by a colon. The elements must be separated by a comma.


      {}
      {"name": "Yugi"}
      {"favoriteFood": "Apfeldreieck", "favoriteAnimal": "cat"}