Comparing XML and JSON Characteristics as Formats for Data Serialization Within Ultralow Power Embedded Systems

Javascript object notation (JSON) and extensible markup language (XML) are two data serialization methods that have been compared over many applications, including client-server transmission, Internet communication, and large-scale data storage. Due to the smaller file size, JSON is faster for trans...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:IEEE embedded systems letters Jg. 16; H. 4; S. 489 - 492
Hauptverfasser: Gerrans, James, Sherratt, R. Simon
Format: Journal Article
Sprache:Englisch
Veröffentlicht: IEEE 01.12.2024
Schlagworte:
ISSN:1943-0663, 1943-0671
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:Javascript object notation (JSON) and extensible markup language (XML) are two data serialization methods that have been compared over many applications, including client-server transmission, Internet communication, and large-scale data storage. Due to the smaller file size, JSON is faster for transmitting data. However, XML is better for sending complex data structures. This letter compares the two data formats in the context of an embedded system, considering factors, such as time, memory, and power to identify efficient characteristics of each method. Programs for each format were written, optimized, and compared for the same dataset. The JSON file was found to be 24.7% smaller than the XML file. This led to a shorter program run-time and less power being consumed when reading and processing the file. However, the program to deserialize the XML file took up 16.7% less flash memory than its JSON counterpart. Overall, JSON was found to be a better choice for systems when collecting large amounts of data, requiring high speed communication, or running for an extended period between battery charges. However, XML is proposed for systems that have limited flash memory.
ISSN:1943-0663
1943-0671
DOI:10.1109/LES.2024.3450576