Skip to content

Instantly share code, notes, and snippets.

@yahyaerturan
Created January 10, 2022 09:18
Show Gist options
  • Save yahyaerturan/df2b7b26322cb7201911982f149b738c to your computer and use it in GitHub Desktop.
Save yahyaerturan/df2b7b26322cb7201911982f149b738c to your computer and use it in GitHub Desktop.
Data Representation
Array of Arrays
[
[
'name' => 'Iphone 13',
'stock_code' => '3414124124',
'color' => 'Space Grey',
'price' => '14500',
'currency' => 'TRL',
],
[
'name' => 'Iphone 12',
'stock_code' => '943243423',
'color' => 'Space Grey',
'price' => '11000',
'currency' => 'TRL',
],
]
Array of Objects
[
stdClass {
name = 'Iphone 13',
stock_code = '3414124124',
color = 'Space Grey',
price = '14500',
currency = 'TRL',
},
stdClass {
name = 'Iphone 12',
stock_code = '943243423',
color = 'Space Grey',
price = '11000',
currency = 'TRL',
}
]
JSON - JavaScript Object Notation
[{"name":"Iphone 13","stock_code":"3414124124","color":"Space Grey","price":"14500","currency":"TRL"},{"name":"Iphone 12","stock_code":"943243423","color":"Space Grey","price":"11000","currency":"TRL"}]
JSON Schema
[{schema:{0:"name",1:"stock_code",2:"color",3:"price",4:"currecy"}},{0:"Iphone 13",1:"3414124124",2:"Space Grey",3:"14500",4:"TRL"},{0:"Iphone 12",1:"943243423",2:"Space Grey",3:"11000",4:"TRL"}]
XML - Extensible Markup Language
<root>
<Row>
<name>Iphone 13</name>
<stock_code>3414124124</stock_code>
<color>Space Grey</color>
<price>14500</price>
<currency>TRL</currency>
</Row>
<Row>
<name>Iphone 12</name>
<stock_code>943243423</stock_code>
<color>Space Grey</color>
<price>11000</price>
<currency>TRL</currency>
</Row>
</root>
CSV - Comma seperated values
Row_name,Row_stock_code,Row_color,Row_price,Row_currency
Iphone 13,3414124124,Space Grey,14500,TRL
Iphone 12,943243423,Space Grey,11000,TRL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment