RepositoryCJPNhật Bản
nopnop2002

nopnop2002/esp-idf-json

Example of JSON Serialize and Deserialize in ESP-IDF

115sao
23fork
0issue
0lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: serializer

#1 Repository của tháng

1
TINIX TRENDING·Chủ đề: esp-idf

#1 Repository của tháng

1
TINIX TRENDING·Chủ đề: deserialize

#1 Repository của tháng

📦 Ví dụ JSON Serialize/Deserialize trên ESP-IDF

Hướng dẫn thực hành JSON trên ESP-IDF với cJSON — từ cấu trúc đơn giản đến lồng nhau phức tạp.

Dự án esp-idf-json của nopnop2002 cung cấp ví dụ rõ ràng về cách thực hiện tuần tự hóa (serialize) và phân tích (deserialize) JSON bằng thư viện cJSON được tích hợp sẵn trong ESP-IDF. Phù hợp cho các bạn mới bắt đầu làm quen với xử lý JSON trên ESP32.

✨ Điểm nổi bật

  • Sử dụng cJSON chuẩn: Tích hợp sẵn trong ESP-IDF, không cần thêm thư viện bên ngoài.
  • Hỗ trợ ESP-IDF V6+: Cập nhật file idf_component.yml để khai báo dependency cJSON từ component registry.
  • Mẫu cấu trúc đa dạng: Bao gồm mảng, đối tượng, và các cấu trúc lồng nhau phức tạp như Object in Array, Array in Object...
  • Hướng dẫn chi tiết tuần tự hóa: Từng bước xây dựng JSON từ cấp thấp lên cao.
  • Lưu ý về bộ nhớ: Nhắc nhở sử dụng cJSON_free() thay vì free() để tránh lỗi heap.
  • Dễ chạy nghiệm trang: Clone và chạy trực tiếp bằng lệnh idf.py flash monitor.

💡 Vì sao đáng chú ý

Không chỉ là tài liệu tham khảo cơ bản, dự án này còn trình bày cách xây dựng từng kiểu cấu trúc JSON phổ biến trong lập trình nhúng, giúp người dùng nhanh chóng nắm vững cách dùng cJSON một cách thực tế. Đặc biệt hữu ích khi cần truyền dữ liệu giữa thiết bị và server qua giao thức như HTTP/MQTT.


#ESP32 #ESP-IDF #JSON #cJSON #OpenSource #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryC
HeyWillow/willow

Open source, local, and self-hosted Amazon Echo/Google Home competitive Voice Assistant alternative

3.1k
Nov 1, 2026
RepositoryC
RavenSystem/esp-homekit-devices

Advanced firmware to add native Apple HomeKit and custom configurations, compatible with any SoC based on ESP32, ESP32-S, ESP32-C and ESP8266 series. (Shelly, Sonoff, Electrodragon, Tuya...)

3.0k
Nov 8, 2026
RepositoryC++
espressif/arduino-esp32

Arduino core for the ESP32 family of SoCs

17.8k
Dec 1, 2026
RepositoryGo
json-iterator/go

A high-performance 100% compatible drop-in replacement of "encoding/json"

13.8k
May 27, 2024
RepositoryC++
thesolarnomad/lora-serialization

LoraWAN serialization/deserialization library for The Things Network

166
Mar 27, 2026
RepositoryRust
ruvnet/RuView

π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.

106.0k
Dec 3, 2026
RepositoryPython
microsoft/markitdown

Python tool for converting files and office documents to Markdown.

199.6k
Dec 3, 2026
RepositoryTypeScript
microsoft/vscode

Visual Studio Code

195.9k
Nov 30, 2026
RepositoryC
lvgl/lvgl

LVGL is a free, full-featured embedded UI library for small MCUs and 3D-capable MPUs, enhanced by LVGL Pro, a professional editor and tooling.

25.3k
Nov 27, 2026