← Case study

Comparative Evaluation of JSON and CBOR for Real-Time Industrial IIoT Systems on ESP32 Edge Devices

Néstor Adrián Balich¹, Franco Adrián Balich¹, Madiyar Zhunussov², Fabian Steinmetz²

¹ Physical Robotics and Artificial Intelligence Laboratory (LRFIA), Center for Advanced Studies in Computer Technology (CAETI), Universidad Abierta Interamericana (UAI), Buenos Aires, Argentina

² Minerva University, San Francisco, United States

English translation of the paper published in Spanish at WICC 2026. The original is the reference version: original poster (Spanish).

Abstract

In Industrial Internet of Things (IIoT) environments, communication efficiency directly affects energy consumption, determinism, scalability and real-time performance. JSON remains the de facto standard for data exchange because it is readable and interoperable, but its text-based nature imposes significant computational overhead on resource-constrained embedded systems.

This work presents an experimental comparison of JSON and CBOR (Concise Binary Object Representation) on an ESP32-based edge node running at 240 MHz. Fifty benchmark trials were run per format over MQTT, measuring payload size, CPU cycles and parsing latency.

The results show that CBOR reduces payload size by 28.2%, reduces CPU cycles by about 99.8%, and improves parsing latency by a factor of about 650 compared with JSON. These findings show that CBOR significantly increases real-time viability, energy efficiency and scalability in IIoT applications.

Keywords: IIoT, CBOR, JSON, edge computing, real-time systems.

1. Context and motivation

Industrial IIoT systems increasingly depend on distributed edge nodes [10] that acquire data, preprocess it and act on it under strict timing constraints. Applications such as predictive maintenance, robotic control, industrial automation and autonomous systems require low latency and deterministic communication.

JSON, defined by the IETF in RFC 8259 [7], has become the dominant serialization format because it is human-readable and widely adopted in web architectures [1]. In embedded industrial environments, however, its character-based encoding introduces parsing complexity, memory fragmentation and higher CPU use [3].

CBOR, standardized by the IETF in RFC 8949 [2], was designed specifically for constrained environments. It provides a schema-free binary encoding optimized for compactness and fast machine parsing.

This study evaluates whether CBOR offers measurable advantages over JSON under real industrial edge conditions, using a widely adopted microcontroller platform: the ESP32 [9]. Several studies have analyzed binary serialization formats for constrained IIoT [3], [4], [5], but few experimental evaluations focus specifically on real-time industrial scenarios.

This work belongs to the research lines of IoT, IIoT, robotics and real-time processing.

1.1 Contributions

2. Experimental method

2.1 Test setup

2.2 Metrics

CPU cycles were measured directly on the ESP32. Latency was measured with microsecond-resolution timers.

3. Results

3.1 Payload size

Format Average payload size
JSON ~709.8 bytes
CBOR ~509.9 bytes

Table 1. Average payload size for JSON and CBOR.

Average network payload size: JSON 709.8 bytes, CBOR 509.9 bytes

Figure 1. Average payload size for JSON and CBOR.

CBOR reduced payload size by 28.2%.

Industrial effect. Shorter transmissions reduce radio on-time, which lowers energy use and improves network throughput in dense IIoT deployments.

3.2 Computational overhead

Format Average CPU cycles
JSON ~1,870,000 cycles
CBOR ~3,100 cycles

Table 2. Average CPU cycles required for deserialization.

Average parsing latency and average CPU cycles for JSON and CBOR on the ESP32

Figure 2. Average parsing latency (left) and average CPU cycles for deserialization (right, logarithmic scale) on the ESP32.

CBOR reduced CPU cycles by 99.8%.

JSON parsing requires character-by-character tokenization, dynamic memory allocation and hierarchical reconstruction of the structure. CBOR uses binary type identifiers that allow direct interpretation at the byte level, without string processing.

Industrial implications. On edge devices that run continuously, lower CPU use allows:

3.3 Latency and real-time viability

Format Average parse time
JSON ~7.8 ms
CBOR ~12 µs

Table 3. Average parsing latency measured on the ESP32.

CBOR improved deserialization latency by a factor of about 650.

In a 100 Hz control loop, with a time budget of 10 ms per cycle:

Parsing latency for each of the 50 trials, JSON and CBOR

Figure 3. Parsing latency across the 50 trials for each format.

Conclusion. JSON introduces non-negligible latency that can compromise deterministic control in industrial systems. CBOR allows near-real-time performance compatible with robotic and automation control loops.

4. Analysis and industrial implications

The results show that the dominant limitation in industrial edge communication is not transmission bandwidth but the computational overhead of deserialization. Although IIoT architectures often emphasize network optimization, this study shows that processing cost on the edge node has a much larger impact on determinism and real-time viability.

On resource-constrained microcontrollers such as the ESP32, JSON parsing requires character-level tokenization, dynamic memory allocation and reconstruction of the hierarchical structure [3]. These operations cause memory fragmentation, higher CPU use and non-deterministic execution time. In industrial automation, where control loops run at 50 to 200 Hz, this variability can compromise system stability and timing guarantees.

CBOR, by contrast, uses a binary encoding with predefined type identifiers [2], which allows direct byte-level interpretation without string processing. This structural simplicity sharply reduces parsing complexity and minimizes variation in execution time. The nearly constant execution time observed in the experiments suggests greater predictability, which is essential for deterministic industrial systems.

From an energy perspective, CPU-intensive deserialization directly increases active processing time and power consumption [6]. In battery-powered or energy-sensitive deployments, such as distributed sensing nodes or mobile robotic platforms, a lower computational load translates into measurable gains in operating autonomy and thermal management.

Scalability is another critical dimension of industrial IoT architectures [6]. In dense IIoT environments with hundreds or thousands of edge nodes publishing telemetry at the same time, fewer CPU cycles per message allow higher aggregate throughput and less system jitter. The lower processing overhead observed with CBOR therefore improves not only individual nodes but also performance at the network level.

These findings indicate that the choice of serialization format should be treated as a systems-level architectural decision in industrial IoT design, not merely as an interoperability choice. JSON remains useful for debugging, logging and human-readable interfaces, but CBOR is technically superior for high-frequency, real-time, energy-constrained industrial edge applications.

In summary, the dominant bottleneck in edge communication is deserialization overhead, not transmission bandwidth. In industrial IoT, deterministic timing and energy efficiency are fundamental [6]. Excess CPU cycles directly affect power consumption, system jitter, message throughput limits and the predictability of control systems. CBOR significantly improves energy efficiency, message scalability (an estimated potential throughput 30 to 50 times higher), deterministic behavior and real-time suitability.

5. Training and international collaboration

This work is part of an institutional strategy to strengthen training in industrial IoT and applied robotics, combining teaching, research and international academic cooperation.

The team consisted of two faculty researchers specializing in IoT and robotics from the Physical Robotics and Artificial Intelligence Laboratory (LRFIA) at Universidad Abierta Interamericana, and two intern students from Minerva University, as part of an academic exchange and inter-university collaboration program.

During the project, the students took part in:

The project strengthened technical skills in industrial IoT system architecture, as well as research methodology, quantitative analysis and academic writing. It also fostered international exchange and collaborative research between Universidad Abierta Interamericana and Minerva University.

6. Conclusions

This experimental evaluation shows that CBOR offers substantial performance advantages over JSON in ESP32-based industrial IoT systems.

Main results:

For industrial IoT automation, robotics, autonomous systems and high-frequency telemetry, CBOR is the technically superior serialization choice. JSON remains suitable for human-readable, non-critical web architectures. In resource-constrained industrial edge environments, however, CBOR enables scalable, energy-efficient and real-time-capable systems.

This work provides quantitative empirical evidence of how serialization format affects the timing determinism of industrial microcontrollers, showing that the format should be treated as a critical architectural decision in the design of real-time IIoT systems.

References

[1] Kaur, A., Ayyagari, S., Mishra, M., & Thukral, R. (2020). A literature review on device-to-device data exchange formats for IoT applications. Journal of Intelligent Systems and Computing, 1(1), 1–10.

[2] Bormann, C., & Hoffman, P. (2020). RFC 8949: Concise Binary Object Representation (CBOR). IETF. https://www.rfc-editor.org/rfc/rfc8949

[3] Viotti, J. C., & Kinderkhedia, M. (2022). A benchmark of JSON-compatible binary serialization specifications. arXiv:2201.03051. https://arxiv.org/abs/2201.03051

[4] Lenders, M. S., Bormann, C., Schmidt, T. C., & Wählisch, M. (2025). A leaner and faster web: How CBOR can improve dynamic content encoding in JSON and DNS over HTTPS. arXiv:2512.12067. https://arxiv.org/abs/2512.12067

[5] Luis, Á., Casares, P., Cuadrado-Gallego, J. J., & Patricio, M. A. (2021). PSON: A serialization format for IoT sensor networks. Sensors, 21(13), 4559. https://www.mdpi.com/1424-8220/21/13/4559

[6] Jadhav, A. M. (2024). Communication protocols for IoT applications. IJRASET. https://www.ijraset.com/research-paper/communication-protocols-for-iot-applications

[7] Bray, T. (2017). RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format. IETF. https://www.rfc-editor.org/rfc/rfc8259

[8] OASIS (2014). MQTT Version 3.1.1. OASIS Standard. https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html

[9] Espressif Systems (2023). ESP32 Technical Reference Manual. https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf

[10] Satyanarayanan, M. (2017). The emergence of edge computing. Computer, 50(1), 30–39. doi:10.1109/MC.2017.9