Comparison of data-serialization formats: Difference between revisions

Content deleted Content added
Overview: FIDO2 uses CBOR
m resize table font
 
(19 intermediate revisions by 11 users not shown)
Line 1:
{{Short description|None}}
This is a '''comparison of [[data serialization]] [[file format|format]]sformats''', various ways to convert complex [[object (computer science)|object]]s to sequences of [[bit]]s. It does not include [[markup language]]s used exclusively as [[document file format]]s.
 
==Overview==
 
{| class="wikitable sortable mw-collapsible"
{{sort-under}}
{{sticky table start}}
{| class="wikitable sortable sort-under sticky-table-head" style="font-size:75%"
|-
! Name
Line 16 ⟶ 19:
! Standard [[API]]s
! Supports [[zero-copy]] operations
|-
| [[Apache Arrow]]
| [[Apache Software Foundation]]
| {{n/a}}
| {{partial|''De facto''}}
| [https://arrow.apache.org/docs/format/Columnar.html Arrow Columnar Format]
| {{yes}}
| {{no}}
| {{yes}}
| {{yes|Built-in}}
| C, C++, C#, Go, Java, JavaScript, Julia, Matlab, Python, R, Ruby, Rust, Swift
| {{yes}}
|-
| [[Apache Avro]]
Line 116 ⟶ 131:
| RFC author:<br>Yakov Shafranovich
| {{n/a}}
| {{partial|A myriad ofMyriad informal variants}}
| RFC 4180<br>(among others)
| {{no}}
Line 473 ⟶ 488:
! Supports [[zero-copy]] operations
|}
{{sticky table end}}
 
{{ordered list
| list-style-type=lower-alpha
Line 486 ⟶ 503:
 
==Syntax comparison of human-readable formats==
 
{| class="wikitable"
{{sticky table start}}
{| class="wikitable sortable sort-under sticky-table-head" style="font-size:75%"
|-
! Format
Line 553 ⟶ 572:
| <code>[true nil -42.1e7 "A to Z"]</code>
| <code>{:kw 1, "42" true, "A to Z" [1 2 3]}</code>
|-
! Format
! [[Nullable type|Null]]
! [[Boolean data type|Boolean]] true
! [[Boolean data type|Boolean]] false
! [[Integer (computer science)|Integer]]
! [[Floating-point]]
! [[String (computer science)|String]]
! [[Array data type|Array]]
! [[Associative array]]/[[Object (computer science)|Object]]
|-
| [[Ion (Serialization format)|Ion]]
Line 637 ⟶ 646:
true
"A to Z", (1, 2, 3)</pre>
|-
! Format
! [[Nullable type|Null]]
! [[Boolean data type|Boolean]] true
! [[Boolean data type|Boolean]] false
! [[Integer (computer science)|Integer]]
! [[Floating-point]]
! [[String (computer science)|String]]
! [[Array data type|Array]]
! [[Associative array]]/[[Object (computer science)|Object]]
|-
| [[OpenDDL]]
Line 763 ⟶ 762:
[extensionFieldThatIsAnEnum]: EnumValue
</syntaxhighlight>
|-
! Format
! [[Nullable type|Null]]
! [[Boolean data type|Boolean]] true
! [[Boolean data type|Boolean]] false
! [[Integer (computer science)|Integer]]
! [[Floating-point]]
! [[String (computer science)|String]]
! [[Array data type|Array]]
! [[Associative array]]/[[Object (computer science)|Object]]
|-
| [[S-expression]]s
Line 856 ⟶ 845:
</struct></syntaxhighlight>
|}
{{sticky table end}}
{{ordered list
| list-style-type=lower-alpha
Line 865 ⟶ 855:
| {{note|lispstd}}This syntax is not compatible with the Internet-Draft, but is used by some dialects of [[Lisp (programming language)|Lisp]].
}}
 
 
==Comparison of binary formats==
<!--This table is meant to describe how the various datatypes are encoded in binary in the various formats.-->
 
{| class="wikitable"
{{sticky table start}}
{| class="wikitable sortable sort-under sticky-table-head sticky-table-col1" style="font-size:75%"
|- style="vertical-align:bottom;"
! Format
Line 876 ⟶ 869:
! [[Floating-point]]
! [[String (computer science)|String]]
! [[Array (data type)|Array]]
! [[Associative array]]/[[object (computer science)|object]]
|- style="vertical-align:top;"
Line 1,027 ⟶ 1,020:
|- style="vertical-align:top;"
| [[Netstring]]s{{efn |group=binary |Interpretation of Netstrings is entirely application- or schema-dependent.}}
| {{No|Not in protocol.}}
| {{No|Not in protocol.}}
| {{No|Not in protocol.}}
Line 1,032 ⟶ 1,026:
| Length-encoded as an ASCII string + ':' + data + ','<br>
Length counts only octets between ':' and ','
| {{No|Not in protocol.}}
| {{No|Not in protocol.}}
| {{No|Not in protocol.}}
Line 1,104 ⟶ 1,097:
|
|}
 
{{sticky table end}}
{{notelist|group=binary}}
 
==See also==
*[[Comparison of document- markup languages]]
 
==References==