Articles → JSON → How JSON Handles Spaces
How JSON Handles Spaces
Types Of Spaces
Spaces | How JSON handles |
---|
New line | Remove space |
Horizontal tab | Remove space |
Leading spaces | Remove all spaces and keep one space |
Trailing spaces | Remove all spaces and keep one space |
Spaces between the words | Remove all spaces and keep one space |
Example
{
"spaces":
["\ ",
"\t",
"\n",
" Test",
"Test ",
"Hello world"
]
}
Output
Click to Enlarge