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



Click to Enlarge


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

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250