Serialization: Difference between revisions

From David's Wiki
(Created page with "Serialization - different ways of storing data. ==Text-based== Encode data as strings. Pros are that it's human readable and widely supported. You can dump JSON without thi...")
 
 
Line 7: Line 7:


* XML
* XML
* JSON
* [[JSON]]
* [[YAML]] - a superset of JSON which uses spaces and is a bit easier to read


==Binary==
==Binary==

Latest revision as of 18:38, 12 February 2024

Serialization - different ways of storing data.

Text-based

Encode data as strings.
Pros are that it's human readable and widely supported. You can dump JSON without third-party libraries in most languages.
Cons are that it takes up much more space/bandwidth and that binary data must first be converted into base64 which can be slow.

  • XML
  • JSON
  • YAML - a superset of JSON which uses spaces and is a bit easier to read

Binary

  • Protocol Buffers, also known as ProtoBuf, is a popular serialization library by Google.
  • flatbuffers is another serialization library by Google meant for high performance.
  • Cap'n Proto, a zero-encoding serialization library by a former ProtoBuf author.