Why Sponsor Oils? | source | all docs for version 0.20.0 | all versions | oilshell.org
Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.
This chapter in the Oils Reference describes errors.
JSON encoding has three possible errors:
Str List Dict
are YSH objects can be serialized.Eggex Func Range
can't.null
like JavaScript.\xfe\xff
"abc\n"
).+
"\z"
or a truncated escape "\u1"
u''
}{
Compared to JSON, JSON8 removes an encoding error:
b"byte \yfe\yff"
.JSON8 has the same decoding errors as JSON, plus:
\u{dc00}
should not be in the surrogate range. This means it doesn't
represent a real character, and \yff
escapes should be used instead.\yff
should not be in u''
string. (It's only valid in b''
strings.)Packle has no encoding errors!
Eggex Func Range
can be turned into "wire Tuple"
(type_name: Str, heap_id: Int)
.
value.Tombstone
?TODO
This is for reference.
Oils stores strings as UTF-8 in memory, so it doesn't often do encoding.
I think this is only leading zeros?
Like the difference between 123
and 0123
.
e.g. decoded to something in the surrogate range
Note: I think this is relaxed for WTF-8, and our JSON decoder probably needs to use it.