# hmnativeAI-cjson **Repository Path**: HMPC2Dtest/hmnativeAI-cjson ## Basic Information - **Project Name**: hmnativeAI-cjson - **Description**: 使用native三方库cjson库实现的鸿蒙应用demo,遍历接口测试 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-20 - **Last Updated**: 2026-03-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # cJSON Library Demo for HarmonyOS This is a HarmonyOS application that demonstrates the usage of the cJSON library for JSON parsing and manipulation. ## Features - Display connected HarmonyOS device model and version - Test various cJSON interfaces with clickable buttons - Show test results with pass/fail status (green for pass, red for fail) in a scrollable panel - Display test results in reverse chronological order (latest first) - Export test results with CSV format generation and clear success message - Display cJSON library version - List supported cJSON interfaces with well-formatted descriptions ## Supported Interfaces - `parse`: Parse JSON string - `createObject`: Create JSON object - `createArray`: Create JSON array - `createNumber`: Create JSON number - `createString`: Create JSON string - `createBool`: Create JSON boolean - `createNull`: Create JSON null - `print`: Convert JSON to string (with/without formatting) - `getArraySize`: Get size of JSON array - `getObjectItem`: Get item from JSON object - `isNumber`: Check if JSON value is number - `isString`: Check if JSON value is string - `isObject`: Check if JSON value is object - `isBool`: Check if JSON value is boolean - `isNull`: Check if JSON value is null - `isArray`: Check if JSON value is array - `version`: Get cJSON library version ## Usage 1. Build the application using DevEco Studio or hvigor 2. Install the HAP package on a HarmonyOS device 3. Launch the application 4. Click on any test button to run the corresponding cJSON interface test 5. View test results in the "测试结果" panel ## Development Notes - This application uses the cJSON library version 1.7.18 - The cJSON library is compiled directly from source for better compatibility - NAPI (Native API) is used to bridge cJSON functions with ArkTS - The application follows ArkTS coding rules and best practices ## AI Generated Code Statistics AI新增生成的代码行数累计:1200 项目新增代码行数累计(不含so等二进制): 1200 AI占比: 100% ## Build Instructions ```bash hvigorw PackageApp ``` ## License This project is licensed under the MIT License. ## Generated at Time: 2026-03-18 17:00:00