The parsing of strings in its current form is very incomplete.
A Jsonnet string is very much like a JSON string, but with some additional flexibility: string literals use " or '. Either can be used to avoid escaping the other, e.g. "Farmer's Gin" instead of 'Farmer\'s Gin'.
As a first step, we should handle:
escape characters \ + oneOf "'\/bfnrt
\uXXXX with 4 hex digits that encode the character's code point (we assume characters in the Basic Multilingual Plane for now)
The parsing of strings in its current form is very incomplete.
A Jsonnet string is very much like a JSON string, but with some additional flexibility: string literals use " or '. Either can be used to avoid escaping the other, e.g. "Farmer's Gin" instead of 'Farmer\'s Gin'.
As a first step, we should handle:
\
+ oneOf"'\/bfnrt
\uXXXX
with 4 hex digits that encode the character's code point (we assume characters in the Basic Multilingual Plane for now)Ref: https://tools.ietf.org/html/rfc8259#section-7
If any doubts, please ask!