An Extensive Study on Text Serialization Formats and Methods

Wang Wei, Li Na, Zhang Lei, Liu Fang, Chen Hao, Yang Xiuying, Huang Lei, Zhao Min, Wu Gang, Zhou Jie, Xu Jing, Sun Tao, Ma Li, Zhu Qiang, Hu Jun, Guo Wei, He Yong, Gao Yuan, Lin Dan, Zheng Yi, Shi Li · 2025

Read An Extensive Study on Text Serialization Formats and Methods by Wang Wei, Li Na, Zhang Lei, Liu Fang, Chen Hao, Yang Xiuying, Huang Lei, Zhao Min, Wu Gang, Zhou Jie, Xu Jing, Sun Tao, Ma Li, Zhu Qiang, Hu Jun, Guo Wei, He Yong, Gao Yuan, Lin Dan, Zheng Yi, Shi Li (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-13478.txt.

Introduction

Turning data structures into text so they can be stored or sent is a daily act in computing, and the format chosen has lasting effects. A twenty-one author team surveys the main text formats, JSON, XML, YAML, and CSV, comparing their structure, readability, size, and fit for different jobs. The survey also covers how reading and writing actually work, including parsing methods and the role of schemas that define a document's shape.

To make the trade-offs concrete, the team presents example performance tables that compare the formats on writing and reading speed and on the size of the output. The discussion weighs verbosity against clarity and machine speed against human ease. The authors aim to give developers a single reference for picking a format with open eyes, rather than by habit, when building systems that exchange data as text.

Catalog record

CREATORWang Wei, Li Na, Zhang Lei, Liu Fang, Chen Hao, Yang Xiuying, Huang Lei, Zhao Min, Wu Gang, Zhou Jie, Xu Jing, Sun Tao, Ma Li, Zhu Qiang, Hu Jun, Guo Wei, He Yong, Gao Yuan, Lin Dan, Zheng Yi, Shi Li
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE30 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-13478

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

An Extensive Study on Text Serialization Formats and Methods Wang Wei, Li Na, Zhang Lei, Liu Fang, Chen Hao, Yang Xiuying, Huang Lei, Zhao Min, Wu Gang, Zhou Jie, Xu Jing, Sun Tao, Ma Li, Zhu Qiang, Hu Jun, Guo Wei, He Yong, Gao Yuan, Lin Dan, Zheng Yi, Shi Li Abstract Text serialization is a fundamental concept in modern computing, enabling the conversion of complex data structures into a format that can be easily stored, transmitted, and reconstructed. This paper provides an extensive overview of text serialization, exploring its importance, prevalent formats, underlying methods, and comparative performance characteristics. We delve into the advantages and disadvantages of various text-based serialization formats, including JSON, XML, YAML, and CSV, examining their structure, readability, verbosity, and suitability for different applications. The paper also discusses the common methods involved in the serialization and deserialization processes, such as parsing techniques and the role of schemas. To illustrate the practical implications of choosing a serialization format, we present hypothetical performance results in the form of tables, comparing formats based on metrics like serialization/deserialization speed and resulting data size. The discussion analyzes these results, highlighting the trade-offs involved in selecting a text serialization format for specific use cases. This work aims to provide a comprehensive resource for understanding and applying text serialization in various computational domains. 1 Introduction In the interconnected world of computing, the ability to represent and exchange data between different systems, applications, and even programming languages is paramount ( Cao 17 ) . Data structures ( HS 82 ; HUA 83 ; Bra 08 ) , which organize information within a program, often need to be converted into a format suitable for storage in files, transmission over networks, or processing by other systems. This conversion process is known as serialization. Conversely, the process of reconstructing the original data structure from its serialized form is called deserialization. Serialization can take various forms, broadly categorized into binary and text-based formats ( SM 12 ; HBL+ 23 ; OL 24 ) . Binary serialization ( VK 22 ) often prioritizes efficiency in terms of space and processing speed, as data is stored in a compact, machine-readable format. However, binary formats ( HTW 02 ) are typically not human-readable and can be challenging to debug or inspect without specialized tools. Text serialization, the focus of this paper, involves representing data as sequences of characters ( AC 21 ; HBL+ 23 ; OL 24 ) . This approach offers significant advantages in terms of human readability, ease of creation and editing using standard text editors, and interoperability across diverse platforms and programming languages due to the ubiquitous support for text processing. Text serialization formats often employ simple, well-defined syntaxes that facilitate parsing and generation. The importance of text serialization is evident in numerous domains: • Configuration Files: Many applications use text-based formats like YAML or INI for storing configuration settings due to their human readability and ease of modification. • Data Interchange: JSON and XML are widely used as data interchange formats in web services and APIs, enabling communication between clients and servers or different services. • Logging and Reporting: Text-based logs are common for recording system events and debugging, as they can be easily read and processed by humans and various tools. CSV is frequently used for generating reports and exchanging tabular data. • Data Storage: Simple data structures or configurations can be stored in text files, often in formats like JSON or YAML. • NLP (Machine Learning): Studies have began representing many forms of data as text to be used with advanced language models. While text serialization offers significant benefits, it also comes with potential drawbacks, such as increased verbosity compared to binary formats, which can lead to larger file sizes and potentially slower processing, especially for very large datasets. The choice of a text serialization format depends heavily on the specific requirements of the application, including the need for human readability, data complexity, performance considerations, and ecosystem compatibility. This paper aims to provide an extensive exploration of text serialization, covering the landscape of popular formats, the underlying mechanisms of serialization and deserialization, and a comparative analysis based on hypothetical performance metrics. By examining the strengths and weaknesses of different approaches, developers and system architects can make informed decisions when choosing a text serialization strategy for their projects. 2 Related Works The field of data serialization has evolved significantly with the increasing need for data exchange and persistence ( HT 21 ) . Numerous formats and protocols have been developed over the years, each with its own design principles, strengths, and weaknesses. This section reviews some of the most prominent text serialization formats and related concepts and applications. 2.1 Markup Languages (XML, HTML) Early web technologies heavily relied on markup languages for structuring and presenting data. XML (Extensible Markup Language) ( B+ 99 ) emerged as a general-purpose markup language designed to describe data. Its self-descriptive nature, using tags to define elements and attributes, made it highly flexible and extensible. XML gained widespread adoption in enterprise applications, document formats (e.g., XHTML, RSS, Atom), and web services (e.g., SOAP). Key features of XML include: • Hierarchical Structure: Data is organized in a tree-like structure with nested elements. • Schema Definition: XML Schemas (XSD) or DTDs (Document Type Definitions) can be used to define the structure and data types of an XML document, enabling validation. • Namespaces: XML supports namespaces to avoid naming conflicts when combining XML fragments from different vocabularies. • Transformations: XSLT (Extensible Stylesheet Language Transformations) allows for the transformation of XML documents into other formats (e.g., HTML, plain text). Despite its power and flexibility, XML is often criticized for its verbosity, which can lead to larger file sizes and increased parsing overhead compared to more modern formats ( HM 04 ; Abi 99 ; Abi 99 ; ABM 08 ) . However it is still extensively used in modern data pipelines found in fields like bioinformatics ( AVB 01 ) HTML (HyperText Markup Language) ( Cas 03 ; MK 02 ) , while primarily a document markup language for web pages, also involves the serialization of structured content into a text format for transmission and rendering by web browsers. However, HTML is less focused on generic data serialization compared to XML. 2.2 Lightweight Data Interchange Formats (JSON, YAML) Motivated by the verbosity of XML and the need for simpler data interchange formats, several lightweight alternatives emerged. 2.2.1 JSON (JavaScript Object Notation) JSON is a text-based data interchange format that is easy for humans to read and write and easy for machines to parse and generate ( PRS+ 16 ; BRSV 17 ) . It is derived from a subset of the JavaScript programming language standard ECMA-262 3rd Edition - December 1999. JSON’s simplicity and native support in JavaScript made it the de facto standard for data exchange in web applications. JSON is built on two structures: • A collection of name/value pairs (commonly realized as an object, record, struct, dictionary, hash table, keyed list, or associative array). • An ordered list of values (commonly realized as an array, vector, list, or sequence). JSON supports basic data types such as strings, numbers, booleans, null, objects, and arrays.

Read the complete text