Jasmine
Jasmine is proprietary serialization format used by Intype. It's inspired by JavaScript, JSON and Apple's PropertList formats. In current version, Jasmine supports some aditional values and notation.
Jasmine has been designed for easier configuration on Intype until UI's are not implemented. Jasmine supports these basic value types:
- Strings
- Symbols
- Numbers
- Arrays
- Dictionaries
- Regular Expressions
Strings
There are two types of string notation: double-quoted and single-quoted. These types differ mostly in escaping, supporting two models: full escaping (for exact input), and loose (for easier input). Strings are basically multi-lined.
Double-Quoted Strings
Double-quoted strings is strict and supports all common escaping sequences:
| Escape Sequence | Description | Unicode |
|---|---|---|
\" |
Quotation Mark | U+0022 |
\\ |
Reversed Solidus | U+005C |
\t |
Tab Character | U+0009 |
\n |
Line Ending (when the string is inserted into document, it's automatically tranformed to user preferences on how line's end in the document) | U+000D U+000A (CR+LF) U+000A(LF) U+000D(CR) |
\uXXXX |
Unicode Character | U+XXXX |
| Other escape sequences are not decoded, and are considered as normal two-character sequence. | ||
Examples:
"String \"with escaped quotes\""
"\tString with tab character"
Single-Quoted Strings
Single-quoted strings are designed for easy textual input. They don't support any of the former escape sequences. There's only one sequence:
| Escape Sequence | Description | Unicode |
|---|---|---|
''double-appostrophe |
Apostrophe | U+0027 |
Examples:
'String ''with escaped'' quotes'
' String with tab character'
String Operators
There are two operators for concatenanting strings. Plus operator simply concatenates strings:
"All your " + "base " + "are belong to " + 'us'
== All your base are belong to us
Plus-NewLine operator concatenates two strings, but inserts line-ending character between the strings.
"All your " \ "base " \ "are belong to " \ 'us'
== All your \nbase \nare belong to \nus
Symbols
Symbols are basically single-word strings, used mainly in dictionary as key-values. A symbol must be a sequence of characters specified in following table and if not used as dictionary key, symbol cannot start with number.
| Characters | Note |
|---|---|
a-zU+0061 to U+007A |
Lowercase Letters |
A-ZU+0041 to U+005A |
Uppercase Letters |
0-9U+0030 to U+0039 |
Numbers |
_U+005F |
Underscore |
-U+002D |
Hyphen |
.U+002E |
Dot |
Numbers
Jasmine supports integers and floating numbers. All these notations are valid:
12345
-12345
3.141592
1.618e+10
1.618E+10
Arrays
Arrays are delimited in square brackets. Array can contain any other value supported by Jasmine. Values don't need to be delimited by comma.
[
"One"
2
{
four_key: Four
}
]
ToDo:
- ToDo: Numbers
- ToDo: Regular expressions
- ToDo: Dictionaries
