Ion is a
data serialization language developed by
Amazon
Amazon most often refers to:
* Amazon River, in South America
* Amazon rainforest, a rainforest covering most of the Amazon basin
* Amazon (company), an American multinational technology company
* Amazons, a tribe of female warriors in Greek myth ...
. It may be represented by either a human-readable text form or a compact binary form. The text form is a superset of
JSON
JSON (JavaScript Object Notation, pronounced or ) is an open standard file format and electronic data interchange, data interchange format that uses Human-readable medium and data, human-readable text to store and transmit data objects consi ...
; thus, any valid JSON document is also a valid Ion document.
Data types
As a superset of JSON, Ion includes the following data types
* : An empty value
* : Boolean values
* : Unicode text literals
* : Ordered heterogeneous collection of Ion values
* : Unordered collection of key/value pairs
The nebulous JSON 'number' type is strictly defined in Ion to be one of
* : Signed integers of arbitrary size
* : 64-bit IEEE binary-encoded floating point numbers
* : Decimal-encoded real numbers of arbitrary precision
Ion adds these types:
* : Date/time/time zone moments of arbitrary precision
* : Unicode symbolic atoms (aka identifiers)
* : Binary data of user-defined encoding
* : Text data of user-defined encoding
* : Ordered collections of values with application-defined semantics
Each Ion type supports a null variant, indicating a lack of value while maintaining a strict type (e.g., , ).
The Ion format permits annotations to any value in the form of symbols. Such annotations may be used as metadata for otherwise opaque data (such as a blob).
Implementations
Amazon supported library implementationsC#Go LangPythonJS
Examples
Sample document
// comments are allowed in Ion files using the double forward slash
Uses
* Amazon's Quantum Ledger Database (QLDB) stores data in Ion documents.
PartiQL an open source SQL-based query language also by Amazon, is built upon Ion. PartiQL supported queries are used by QLDB, S3Select.
Tooling and extensions
Ion Path Extractor APIaims to combine the convenience of a DOM API with the speed of a streaming API.
* IDE support
*
Eclipse*
IntelliJJackson data format module for IonApache Hive SerDefor Ion
Ion Schema*
*
ImplementationsIon Hashdefines an algorithm for constructing a hash for any Ion value.
*
*
References
External links
Java API documentationC# implementation
{{Data Exchange
Data serialization formats
Markup languages