Open Strings

This is the simplest and the most basic type of format is the Open string format. As the name suggests, open strings are not enclosed within any sort of enclosures or quotation marks. This free and open type of string starts with any non-whitespace codepoint. They end when any structural character(s) is encountered or when the end of the document is reached.

Open strings can not start or end with the whitespace character. However, whitespace characters within the strings are preserved. The quotation characters ( " U+0022 or ' U+0027) do not require to be escaped.

An Open String Walkthrough

A simple open string. Notice it is not enclosed in any sort of enclosures.

John Doe

Quotes in the open strings don't cause termination.

Peter D'mello 

The following object contains three open string Unicode values.

जॉन डो, Wow Great, 😃

To create a multiline string, you don't need any escaping mechanism. In the following case, a string is spread over the five lines.

Lorem ipsum dolor sit amet consetetur sadipscing elitr sed 
diam nonumy eirmod. 

Tempor invidunt ut labore et dolore magna aliquyam erat 
sed diam voluptua


In order to keep things simple, the open string format does not support character escaping. If the text does not fit into open string format, other formats such as regular string can be used.

Last updated