{"id":25560013,"url":"https://github.com/styropyr0/json_encoder","last_synced_at":"2025-08-11T17:34:55.509Z","repository":{"id":253546134,"uuid":"843831801","full_name":"styropyr0/JSON_Encoder","owner":"styropyr0","description":"A library specifically made for arduino devices to encode JSON strings to URL strings and vice versa.","archived":false,"fork":false,"pushed_at":"2024-11-22T06:40:25.000Z","size":5,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T04:54:19.329Z","etag":null,"topics":["arduino","arduino-ide","arduino-json","arduino-library","arduino-uno","arduino-web-client","arduino-webserver","esp32","json-decoder","json-decoding","json-encoder"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/styropyr0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-17T14:55:40.000Z","updated_at":"2025-03-27T15:49:55.000Z","dependencies_parsed_at":"2024-08-17T16:01:19.709Z","dependency_job_id":"36158371-c7ab-4646-9bf4-1dc796e893f8","html_url":"https://github.com/styropyr0/JSON_Encoder","commit_stats":null,"previous_names":["styropyr0/json_encoder"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/styropyr0/JSON_Encoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styropyr0%2FJSON_Encoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styropyr0%2FJSON_Encoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styropyr0%2FJSON_Encoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styropyr0%2FJSON_Encoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/styropyr0","download_url":"https://codeload.github.com/styropyr0/JSON_Encoder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styropyr0%2FJSON_Encoder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264833292,"owners_count":23670617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","arduino-ide","arduino-json","arduino-library","arduino-uno","arduino-web-client","arduino-webserver","esp32","json-decoder","json-decoding","json-encoder"],"created_at":"2025-02-20T17:28:52.491Z","updated_at":"2025-07-11T14:38:11.570Z","avatar_url":"https://github.com/styropyr0.png","language":"C++","readme":"# JSON_Encoder for Arduino\n\n**JSON_Encoder** is a lightweight Arduino library designed to handle URL encoding and decoding for JSON strings. This library is particularly useful for IoT and microcontroller applications where JSON data must be transmitted over networks with URL-safe formatting.\n\n## Features\n\n- **URL Encoding**: Converts JSON strings into URL-encoded format for safe transmission.\n- **URL Decoding**: Reconstructs JSON strings from URL-encoded strings.\n- **Simple API**: Minimal and intuitive function calls for seamless integration.\n- **Optimized for Arduino**: Lightweight and compatible with all Arduino-compatible boards.\n\n## Installation\n\n### Using the Arduino Library Manager\n\n1. Open the Arduino IDE.\n2. Navigate to **Sketch** \u003e **Include Library** \u003e **Manage Libraries...**.\n3. Search for `JSON_Encoder` and click **Install**.\n\n### Manual Installation\n\n1. Download the library as a ZIP file from the [GitHub repository](https://github.com/styropyr0/JSON_Encoder).\n2. Open the Arduino IDE.\n3. Navigate to **Sketch** \u003e **Include Library** \u003e **Add .ZIP Library...**.\n4. Select the downloaded ZIP file.\n\n## API Reference\n\n### `encode(String jsonString)`\n\n- **Description**: Converts a JSON string into a URL-encoded string.\n- **Parameters**: \n  - `jsonString` (String): The input JSON string.\n- **Returns**: A URL-encoded string.\n\n### `decode(String codedString)`\n\n- **Description**: Converts a URL-encoded string back into a JSON string.\n- **Parameters**: \n  - `codedString` (String): The URL-encoded input string.\n- **Returns**: A JSON-formatted string.\n\n## Example Usage\n\n### Encoding a JSON String\n\n```cpp\n#include \u003cJSON_Encoder.h\u003e\n\nvoid setup() {\n    Serial.begin(9600);\n    String json = \"{\\\"temperature\\\":23.5,\\\"humidity\\\":45}\";\n    String encoded = encode(json);\n    Serial.println(\"Encoded: \" + encoded);\n}\n\nvoid loop() {\n    // No loop actions needed\n}\n```\n\n### Decoding a URL-Encoded String\n\n```cpp\n#include \u003cJSON_Encoder.h\u003e\n\nvoid setup() {\n    Serial.begin(9600);\n    String encoded = \"%7B%22temperature%22%3A23.5%2C%22humidity%22%3A45%7D\";\n    String json = decode(encoded);\n    Serial.println(\"Decoded: \" + json);\n}\n\nvoid loop() {\n    // No loop actions needed\n}\n```\n\n### Sample Output\n\n**Encoded**: `%7B%22temperature%22%3A23.5%2C%22humidity%22%3A45%7D`  \n**Decoded**: `{\"temperature\":23.5,\"humidity\":45}`\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests to improve the library.\n\n## License\n\nThis library is licensed under the [MIT License](LICENSE).\n\n## Author\n\nDeveloped by **Saurav Sajeev**. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyropyr0%2Fjson_encoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstyropyr0%2Fjson_encoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyropyr0%2Fjson_encoder/lists"}