Skip to main content

Things a QA engineer must know about JSON

JSON : JavaScript Object Notation

JSON highly used in web services and rest applications. When a tester testing API he/she should have some knowledge to pass JSON objects and to understand received Jason response.  JSON is not a replacement of XML but it is very much useful in mobile applications. XML file size much larger than JSON and mobile applications prefer lightweight ways to communicate. In that case JSON is the most suitable one.



Why JSON

  • Easy for anyone to read and write.
  • Language independent
  • Some syntaxes are JavaScript objects. 
  • Can be used to store application data. 

JSON Values

  • String 
  • Numbers
  • True/false
  • Null
  • Objects
  • Arrays 

JSON Objects

It is a name values pair using a colon. 

Syntax
Sample

{
   name : value,
   name : value
}


{
   “name” : “Isuri”,
   “age” : 25
}


JSON Arrays

Values enclosed by brackets and separated by commas. 

Syntax
Sample

[value, value, value, value]


[1,2,3,4,5,6]



JSON file is a collection of values, objects and arrays






Comments

Popular posts from this blog

Differences between Severity ,Priority and Status

In market there are many bug tracking and project management tools available. These tools allow us to keep essential information of a bug or task. You will see there are three places have to fill when key in a task. Those three places are Status, Priority and Status of a bug/task. Let's see what those stand for.  Severity Priority Status Connotation Severity of a bug means how much it affecting to functionality of the software. Total damage it can do. Priority means how fast a bug or task should be resolve. Status means the current position of the bug/task. Types            Critical            Major            Moderate            Minor           Cosmetic           Low           Medium       ...

MVC Architecture

Model-View-Controller (MVC) is a design pattern recently most popular among software engineers for applications which are needed to provide multiple views with using same data. I am suggesting MVC is better than WCF, because of this module separation. For an examples       ·          Multiple views and controllers can interface with same model for modification even those never exist before add this model.       ·          It is supporting all type of HTML verbs.       ·          No view state and post back events.       ·          Easy integration with JavaScript framework.       ·          Helps to decrease complexity of project       ·          P...