Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds chapters on text encoding #381

Merged
merged 3 commits into from
Feb 20, 2025
Merged

Conversation

popematt
Copy link
Contributor

@popematt popematt commented Feb 15, 2025

Issue #, if available:

N/A

Description of changes:

Adds chapters about the text encoding to the Ion 1.1 specification. They are mostly lifted (with some editing and rearranging) from parts of the Ion 1.0 spec, but has an added section on E-expressions.

See it here: https://popematt.github.io/ion-docs/books/ion-1-1/text/encoding.html


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@tgregg tgregg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; a few simple suggestions.

# Values

## Annotations
In the text format, type annotations are denoted by a [symbol token](symbol-tokens.md) and double-colons preceding any value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably note that e-expressions and expression groups are not values, and cannot be annotated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can mention it, but it's not specific to the text encoding. I tried to keep this mostly focused to the encoding itself.

Whitespace is insignificant and is only required where necessary to separate tokens, and C-style comments
(either block or in-line) are treated as whitespace (and are not part of the binary encoding).

A text Ion 1.1 stream begins with the Ion 1.1 [version marker](../todo.md) (`$ion_1_1`) followed by a series of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the binary section I think I linked to the glossary for "Ion version marker". Do you think it needs its own page or section somewhere?

Copy link
Contributor Author

@popematt popematt Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a section that defines the semantics of an Ion stream. By that I mean a chapter that covers things like IVMs, system values vs user values, and $ion_literal.

[ 1 , two ] // List of an int and a symbol
[a , [b]] // Nested list
[ 1.2, ] // Trailing comma is legal in Ion (unlike JSON)
[ 1, , 2 ] // ERROR: missing element between commas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe throw in an example that has a nested e-expression?

@popematt popematt merged commit 3274e27 into amazon-ion:gh-pages Feb 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants