/
properties.expected
80 lines (80 loc) · 3.95 KB
/
properties.expected
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
[
{"type":"CommentSingle","value":"# You are reading a comment in \".properties\" file."},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"! The exclamation mark can also be used for comments."},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# Lines with \"properties\" contain a key and a value separated by a delimiting character."},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# There are 3 delimiting characters: '=' (equal), ':' (colon) and whitespace (space, \\t and \\f)."},
{"type":"Text","value":"\n"},
{"type":"NameAttribute","value":"website"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"https://en.wikipedia.org/"},
{"type":"Text","value":"\n"},
{"type":"NameAttribute","value":"language"},
{"type":"Text","value":" "},
{"type":"Operator","value":":"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"English"},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# White space that appears between the key, the value and the delimiter is ignored."},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# This means that the following are equivalent (other than for readability)."},
{"type":"Text","value":"\n"},
{"type":"NameAttribute","value":"hello"},
{"type":"Operator","value":"="},
{"type":"LiteralString","value":"hello"},
{"type":"Text","value":"\n"},
{"type":"NameAttribute","value":"hello"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"hello"},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# Keys with the same name will be overwritten by the key that is the furthest in a file."},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# For example the final value for \"duplicateKey\" will be \"second\"."},
{"type":"Text","value":"\n"},
{"type":"NameAttribute","value":"duplicateKey"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"first"},
{"type":"Text","value":"\n"},
{"type":"NameAttribute","value":"duplicateKey"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"second"},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# If you need to add newlines and carriage returns, they need to be escaped using \\n and \\r respectively."},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# You can also optionally escape tabs with \\t for readability purposes."},
{"type":"Text","value":"\n"},
{"type":"NameAttribute","value":"valueWithEscapes"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"This is a newline\\n and a carriage return\\r and a tab\\t."},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# You can also use Unicode escape characters (maximum of four hexadecimal digits)."},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# In the following example, the value for \"encodedHelloInJapanese\" is \"こんにちは\"."},
{"type":"Text","value":"\n"},
{"type":"NameAttribute","value":"encodedHelloInJapanese"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"\\u3053\\u3093\\u306b\\u3061\\u306f"},
{"type":"Text","value":"\n"},
{"type":"CommentSingle","value":"# But with more modern file encodings like UTF-8, you can directly use supported characters."},
{"type":"Text","value":"\n"},
{"type":"NameAttribute","value":"helloInJapanese"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"こんにちは"},
{"type":"Text","value":"\n"}
]