Story of Taj Group (Fictional)
- Taj group has two applications from different vendors

- How can two applications exchange data?
- We might need a data exchange format which
- is easier to understand
- No particular programming languages assumptions
- Easy to read (by both humans & programs)
- Lets Start with XML:
Json (JavaScript Object Notation)
- Data is represented as name value pairs
- Advantages:
- It is light weight
- Easy to read and write
- Data can be in the form of
- Data can be plural or complex
- Lets try to Think of information, in terms of name value pairs. Lets try to write the info about Bahubali
- Different Name value pairs

- If we want to enter data in to the name value pairs the data types could be

- Basic Json Reprsentation
- In Json Data is represented as
<name>: <value>
- Eg:
"Hero": "Prabhas"
- Json Data Types: Value section might have different values. Value Types could be one of
- String/Text: ”
- Number
- Boolean: true/false
- list: represented in []
- object (Complex): Describing this type might require some more name value pairs. Represented in { }
- Lets write a simple json to represent Bahubali
{
"title": "Bahubali The Begining",
"Director": "S.S. Rajamouli",
"Writer": "Vijayendra Prasad",
"BoxOfficeInCrores": 600,
"BudgetInCrores": 180,
"Released": "10/07/2015",
"Languages": [ "Telugu", "Tamil", "Malayalam", "Hindi" ],
"Distributors": {
"Telugu": "Arka Media Works",
"Tamil": [ "StudioGreen", "Sri Thenandal Films", "UV Productions"],
"Hindi": "Dharma Productions",
"Malayalam": "Global United Media"
}
}
YAML (YAML Ain’t a Markup Language)
- This also can be used for data exchanges and configurations
- Belives in indendation like python
- YAML is also collection of name value pairs
- In YAML Data is represented as
<name>: <value>
- The Datatypes for Yaml are same as json.
- Text is represented in quotes
- List Items start with –
- Object will start at the next indendation
- Example
---
name: 'Bahubali The Begining'
director: 'S.S. Rajamouli'
story: 'Vijayendra Prasad'
BoxOfficeInCrores: 600
BudgetInCrores: 180
Released: '10/07/2015'
Languages:
- Telugu
- Hindi
- Malayalam
- Tamil
Distributors:
Telugu: 'Arka Media Works'
Hindi: 'Dharma Productions'
Tamil:
- 'Studio Green'
- 'Sri Thenandal Films'
- 'UV Creations'
Malayalam: 'Global United Media'