// Keeps info about users account in bank
typedef struct account {
// account number in bank
int account_number;
char *first_name;
char *last_name;
// balance in bank
float balance;
int cards[5];
} account;
account a={100500,"Bob","Marley",999.999,{666,777,888,999,555}};
<?xml version="1.0"?>
<!-- Keeps info about users account in bank -->
<account>
<!-- account number in bank -->
<account_number>100500</account_number>
<first_name>"Bob"</first_name>
<last_name>"de Marley"</last_name>
<!-- balance in bank -->
<balance>999.999</balance>
<cards>
<item>666</item>
<item>777</item>
<item>888</item>
<item>999</item>
<item>555</item>
<cards>
</account>
* hard find and edit data by hands.
* a lot of overhead data like close attributes for ex.: </account>
* a lot of overhead data with serialization arrays
<?xml version="1.0"?>
<!-- Keeps info about users account in bank -->
<account first_name="Bob" last_name="de Marley">
<!-- account number in bank -->
<account_number>100500</account_number>
<!-- balance in bank -->
<balance>999.999</balance>
<cards>
<item>666</item>
<item>777</item>
<item>888</item>
<item>999</item>
<item>555</item>
<cards>
</account>
* hard find and edit data by hands.
* for variables that appeares in attributes we can't add comments
{
"account" : {
"account_number":100500,
"first_name":"Bob",
"last_name":"de Marley",
"balance":999.999,
"cards":[666,777,888,999,555]
}
}
* hard find and edit data by hands
* easy miss comma ',' at the end of last block
* several ways(standarts) to define keys with or without '"'
* no place to add comments
* different syntaxes for arrays and key-values
(account ; Keeps info about users account in bank
(account_number ; account number in bank
100500)
(first_name "Bob")
(last_name "de Marley")
(balance ; balance in bank
999.999)
(cards 666 777 888 999 555))