Download FreeRTOS

Quality RTOS & Embedded Software

Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.
This page links to demo projects suitable for learning to use the coreJSON library. Separately, the IoT Reference Integrations section demonstrates the library integrated into an application.

Parser library that strictly enforces the ECMA-404 JSON standard


JSON (JavaScript Object Notation) is a human-readable data serialization format which comes from JavaScript. It is widely used to exchange data, such as with the AWS IoT Device Shadow service, and is part of many APIs, such as the GitHub REST API. JSON is maintained as a standard by Ecma International.

The coreJSON library provides a parser that supports key lookups while strictly enforcing the standard (ECMA-404: The JSON Data Interchange Standard). The library is written in C and designed to comply with ISO C90 and MISRA C:2012. It has proofs showing safe memory use and no heap allocation, making it suitable for IoT microcontrollers, but also fully portable to other platforms.

Source Code Organization and Demos

The coreJSON library can be found in the main FreeRTOS download in the FreeRTOS/FreeRTOS-Plus/Source/coreJSON directory. A demonstration of the coreJSON library can viewed in the IoT Device Shadow demo.

Memory Usage

The coreJSON library uses an internal stack to track nested structures in a JSON document. The stack exists for the duration of a single function call; it is not preserved. Stack size may be specified by defining the macro JSON_MAX_DEPTH, which defaults to 32 levels. Each level consumes a single byte.


Code Size of coreJSON (example generated with GCC for ARM Cortex-M)
FileWith -O1 OptimizationWith -Os Optimization
Total estimates2.9K2.4K
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.