Articles → JSON → How JSON Handles Spaces

How JSON Handles Spaces






Types Of Spaces




SpacesHow JSON handles
New lineRemove space
Horizontal tabRemove space
Leading spacesRemove all spaces and keep one space
Trailing spacesRemove all spaces and keep one space
Spaces between the wordsRemove all spaces and keep one space



Example


{
"spaces":
["\         ", 
"\t", 
"\n",
"               Test", 
"Test               ", 
"Hello                            world"
]
}



Output


Picture showing the json viewer that shows how spaces are handled in json
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, November 16, 2017

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250