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...

Full description

Saved in:
Bibliographic Details
Published in:IEEE embedded systems letters Vol. 16; no. 4; pp. 489 - 492
Main Authors: Gerrans, James, Sherratt, R. Simon
Format: Journal Article
Language:English
Published: IEEE 01.12.2024
Subjects:
ISSN:1943-0663, 1943-0671
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary: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