Title: Theory / Unimportant / CS / Descriptive / JSON / ION
Tags: comment
On every note of this deck, unless a note says otherwise:
Page: https://amzn.github.io/ion-docs/docs/spec.html
Page: https://amzn.github.io/ion-docs/docs/spec.html

Name: Amazon Ion
Definition: richly-typed
Page: https://amzn.github.io/ion-docs/
Definition2: self-describing
Definition3: hierarchical data
Definition4: serialization format
Definition5: interchangeable binary and text representation

Language: Ion
Instruction: // foo
Other fields (not shown on cards):
Page: https://amzn.github.io/ion-docs/

Name: The ion types
Definition: null
Page: https://amzn.github.io/ion-docs/docs/spec.html
Definition2: bool
Definition3: int
Definition4: float
Definition5: decimal
Definition6: timestamp
Definition7: string
Definition8: symbol
Definition9: blob
Definition10: clob
Definition11: struct
Definition12: list
Definition13: sexp

Meaning: blob
Language: Ion
Implementation: Binary data of user-defined encoding

Meaning: clob
Language: Ion
Implementation: Text data of user-defined encoding

Typ: struct
Meaning: Unordered collections of tagged values
Language: Ion

Typ: sexp
Meaning: Ordered collections of values with application-defined semantics
Language: Ion

Instruction: null.null
Language: Ion
Abbreviation: null

Instruction: null.tye
Language: Ion
Returns: null
Typ: type

Instruction: N.Md0
Language: Ion
Returns: the decimal denoted by N.M
Abbreviation: N.M
Typ: type

Instruction: N.MdE
Language: Ion
Returns: the decimal denoted by (N.M) times (2^E)
Typ: type

Instruction: N.MeE
Language: Ion
Returns: the float denoted by (N.M) times (2^E)
Typ: type

Instruction: YYYYT
Language: Ion
Returns: the year YYYY
Typ: timestamp

Instruction: YYYY-MMT
Language: Ion
Returns: the month YYYY-MM
Typ: timestamp

Instruction: YYYY-MM-DDT
Language: Ion
Returns: the day YYYY-MM-DD
Abbreviation: YYYY-MM-DD
Typ: timestamp

Instruction: Z
Language: Ion
Returns: UTC
Typ: time offset

Instruction: -00:00
Language: Ion
Returns: Unknown offset
Typ: time offset

Instruction: \(\pm HH:MM\)
Language: Ion
Returns: Offset of HH hours and MM minutes
Typ: time offset

Instruction: YYYY-MM-DDTHHto
Language: Ion
Returns: Hour YYYY-MM-DD HH with time offset to
Typ: timestamp

Instruction: YYYY-MM-DDTHH:MMto
Language: Ion
Returns: Hour YYYY-MM-DD HH:MM with time offset to
Typ: timestamp

Instruction: YYYY-MM-DDTHH:MM:SSto
Language: Ion
Returns: Second YYYY-MM-DD HH:MM:SS with time offset to
Typ: timestamp

Instruction: YYYY-MM-DDTHH:MM:SS.p...pto
Language: Ion
Returns: Time YYYY-MM-DD HH:MM:SS.p...p with time offset to. The second is a decimal
Typ: timestamp

Instruction: ''' some
long
string with
potential newline'''
Language: Ion
Returns: The string with potential new lines

Question: ''' string 1 ''' ''' string 2 '''
Answer: Concatenation ''' string 1  string 2 '''
Page: https://amzn.github.io/ion-docs/docs/spec.html
Context: Ion

Instruction: 'foo'
Language: Ion
Returns: the identifier foo
Abbreviation: foo (assuming foo has no space, no single quote)
Assuming: foo contains letters, digits, or the characters $ (dollar sign) or _ (underscore), not starting with a digit.
Typ: identifier

Typ: operator
Language: Ion
Context: S-expressions
Implementation: a sequence of !#%&*+-./;<=>?@^`|~
Subtype of: symbol

Name: Symbol
Definition: operator
Page: https://amzn.github.io/ion-docs/docs/spec.html
Notation: Ion
Definition2: identifier
Conjdef: either

Meaning: Arbitrary raw binary data
Language: Ion
Name: Blob

Instruction: {{ base64_encoding }}
Language: Ion
Returns: The blob encoded in base64_encoding

Instruction: {{ some_string }}
Language: Ion
Returns: The clob in some_string
Assuming: some_string contains 7 bit ASCII

Typ: Clob
Meaning: Some arbitrary data represented in 7-digits ASCII string
Language: Ion

Name: Container
Definition: Structures
Page: https://amzn.github.io/ion-docs/docs/spec.html
Context: Ion
Definition2: List
Definition3: S-expression
DefType: A type containing other ION values

Instruction: {
  name_1 : value_1,
  ...
  name_n: value_n
}
Context: Ion
Returns: A structure, associating to a name the unordered set of values associated to the various occurence of this name
Assuming: name_i is in double quote if it is not symbol

Instruction: [value_1, ..., value_n]
Context: Ion
Returns: A list of n element whose i-th value is value_i

Instruction: (value_1 ... value_n)
Context: Ion
Returns: A S-expression of n element whose i-th value is value_i

Instruction: foo :: bar
Context: Ion
Returns: The value bar with annotation foo

Smaller0: f is valid json file
Greater0: f is valid Ion text file
Page: https://amzn.github.io/ion-docs/docs/spec.html
Variables: f a file