Hacker News new | ask | show | jobs
by rjempson 4812 days ago
What happens if the data has spaces in it or new lines in it? in other words, how do you escape a space / new line?
1 comments

Spaces are not a problem in values and need no escape. To escape a newline in a value, just indent it appropriately. For example:

    myKey this is a multiline string
     and the indent on this line indicates that.
     It can even be 3 lines long :)
    someOtherKey and now this is a separate key/value pair.
Like URLs, new lines and spaces are not allowed in keys.