Ion is a data serialization language developed by Amazon. It may be represented by either a human-readable text form or a compact binary form. The text form is a superset of JSON; thus, any valid JSON document is also a valid Ion document.
As a superset of JSON, Ion includes the following data types
null: An empty value
bool: Boolean values
string: Unicode text literals
list: Ordered heterogeneous collection of Ion values
struct: Unordered collection of key/value pairs
The nebulous JSON 'number' type is strictly defined in Ion to be one of
int: Signed integers of arbitrary size
float: 64-bit IEEE binary-encoded floating point numbers
decimal: Decimal-encoded real numbers of arbitrary precision
Ion adds these types:
timestamp: Date/time/time zone moments of arbitrary precision
symbol: Unicode symbolic atoms (aka identifiers)
blob: Binary data of user-defined encoding
clob: Text data of user-defined encoding
sexp: 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., null.int, null.struct).
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 implementations
C#
Go Lang
Python
JS
Examples
Sample document
// comments are allowed in Ion files using the double forward slash {key:"value",// key here is a symbol, it can also be a string as in JSONnums:1_000_000,// equivalent to 1000000, use of underscores with numbers is more readable'A float value':31415e-4,// key is a value that contains spaces "An int value":.int,annotated:age::35,// age here is the annotation to number 35lists:'hw grades'::[80,85,90],// any symbol can be used as an annotation many_annot:I::have::many::annotations::true,// annotations are not nested, but rather, a list of annotationssexp:(this(isa[valid]"Ion")last::value42)// Ion S-expressions, _value:{{OiBTIKUgTyAASb8=}},_value:{{"a b"}}}
Uses
Amazon's Quantum Ledger Database (QLDB) stores data in Ion documents.[1]
PartiQL, an open source SQL-based query language also by Amazon, is built upon Ion. PartiQL supported queries are used by QLDB, S3Select.[2]
Tooling and extensions
Ion Path Extractor API aims to combine the convenience of a DOM API with the speed of a streaming API.
IDE support
Eclipse
IntelliJ
Jackson data format module for Ion
Apache Hive SerDe for Ion
Ion Schema
Specification
Implementations
Ion Hash defines an algorithm for constructing a hash for any Ion value.
Specification
Implementations
References
^"We are the Amazon Managed Blockchain and Amazon QLDB Teams – Ask the AWS Experts – November 29 @ 3PM PST / 6PM EST". 28 November 2018.
^"Announcing PartiQL: One query language for all your data". August 2019.
External links
Ion specification
Amazon supported language implementations
Java API documentation
C# implementation
January 31, 2023
serialization, format, other, uses, disambiguation, topic, this, article, meet, wikipedia, general, notability, guideline, please, help, demonstrate, notability, topic, citing, reliable, secondary, sources, that, independent, topic, provide, significant, cover. For other uses see Ion disambiguation The topic of this article may not meet Wikipedia s general notability guideline Please help to demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention If notability cannot be shown the article is likely to be merged redirected or deleted Find sources Ion serialization format news newspapers books scholar JSTOR July 2017 Learn how and when to remove this template message Ion is a data serialization language developed by Amazon It may be represented by either a human readable text form or a compact binary form The text form is a superset of JSON thus any valid JSON document is also a valid Ion document IonFilename extension ionInternet media typeapplication ionDeveloped byAmazonType of formatData interchangeWebsiteamzn wbr github wbr io wbr ion docs wbr Contents 1 Data types 2 Implementations 3 Examples 3 1 Sample document 3 2 Uses 4 Tooling and extensions 5 References 6 External linksData types EditAs a superset of JSON Ion includes the following data types null An empty value bool Boolean values string Unicode text literals list Ordered heterogeneous collection of Ion values struct Unordered collection of key value pairsThe nebulous JSON number type is strictly defined in Ion to be one of int Signed integers of arbitrary size float 64 bit IEEE binary encoded floating point numbers decimal Decimal encoded real numbers of arbitrary precisionIon adds these types timestamp Date time time zone moments of arbitrary precision symbol Unicode symbolic atoms aka identifiers blob Binary data of user defined encoding clob Text data of user defined encoding sexp Ordered collections of values with application defined semanticsEach Ion type supports a null variant indicating a lack of value while maintaining a strict type e g null int null struct 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 EditAmazon supported library implementations C Go Lang Python JSExamples EditSample document Edit comments are allowed in Ion files using the double forward slash key value key here is a symbol it can also be a string as in JSON nums 1 000 000 equivalent to 1000000 use of underscores with numbers is more readable A float value 31415e 4 key is a value that contains spaces An int value int annotated age 35 age here is the annotation to number 35 lists hw grades 80 85 90 any symbol can be used as an annotation many annot I have many annotations true annotations are not nested but rather a list of annotations sexp this is a valid Ion last value 42 Ion S expressions value OiBTIKUgTyAASb8 value a b Uses Edit Amazon s Quantum Ledger Database QLDB stores data in Ion documents 1 PartiQL an open source SQL based query language also by Amazon is built upon Ion PartiQL supported queries are used by QLDB S3Select 2 Tooling and extensions EditIon Path Extractor API aims to combine the convenience of a DOM API with the speed of a streaming API IDE support Eclipse IntelliJ Jackson data format module for Ion Apache Hive SerDe for Ion Ion Schema Specification Implementations Ion Hash defines an algorithm for constructing a hash for any Ion value Specification ImplementationsReferences Edit We are the Amazon Managed Blockchain and Amazon QLDB Teams Ask the AWS Experts November 29 3PM PST 6PM EST 28 November 2018 Announcing PartiQL One query language for all your data August 2019 External links EditIon specification Amazon supported language implementations Java API documentation C implementation Retrieved from https en wikipedia org w index php title Ion serialization format amp oldid 1120648954, wikipedia, wiki, book, books, library,