{"id":19998122,"url":"https://github.com/gob52/gob_json","last_synced_at":"2026-03-06T19:06:43.285Z","repository":{"id":160341299,"uuid":"586144946","full_name":"GOB52/gob_json","owner":"GOB52","description":"Library for parsing potentially huge json streams on devices with scarce memory . Based on mrfaptastic/json-streaming-parser2, modified and extended independently.","archived":false,"fork":false,"pushed_at":"2023-02-18T09:18:11.000Z","size":121,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T14:46:54.134Z","etag":null,"topics":["arduino","json","streaming-json"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GOB52.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2023-01-07T04:55:37.000Z","updated_at":"2023-01-31T23:12:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1bcced7-cb01-4585-a0ae-c06840813775","html_url":"https://github.com/GOB52/gob_json","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/GOB52/gob_json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOB52%2Fgob_json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOB52%2Fgob_json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOB52%2Fgob_json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOB52%2Fgob_json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GOB52","download_url":"https://codeload.github.com/GOB52/gob_json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOB52%2Fgob_json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30192433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T18:54:55.862Z","status":"ssl_error","status_checked_at":"2026-03-06T18:53:04.013Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","json","streaming-json"],"created_at":"2024-11-13T05:07:26.320Z","updated_at":"2026-03-06T19:06:43.277Z","avatar_url":"https://github.com/GOB52.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gob_json\n\nLibrary for parsing potentially huge json streams on devices with scarce memory .  \nBased on mrfaptastic/json-streaming-parser2, modified and extended independently.\n\nThanks to @mrfaptastic(https://github.com/mrfaptastic/json-streaming-parser2) ,  \n@squix78(https://github.com/squix78/json-streaming-parser) and those contributors.\n\n\n## Overview\nWhen constructing some structure from JSON, it is difficult in an environment with limited memory resources once a JSON object or something similar is used.  \nTherefore, there is a certain demand for streaming-type JSON parsers.  \nThis is because the parser of type streaming can convert JSON directly into a structure.  \n(However, it takes time and effort to prepare for this)\n\n- json-streaming-parser  \nSimple but functional enough as a streaming type.\n- josn-streming-parser2  \nFurther developed to facilitate key and value retrieval.\n\n\n## Modifications from json-streaming-parser2\n\n### Namespace management by namespace\nClasses and structures now belong to namespace **goblib::json**\n\n### To prevent unexpected substitutions and name collisions in the preprocessor, the definition of the header  has been changed to an enumerated type\n\n### Support operation in environments where the char is signed\nImproved to work in non-Arduino environment. It is important that it works with Kanji and pictogram input.  \n(Remarks. In Arduino, char type is unsigned)\n\n### Support for integral type size up to \"uintmax_t\"\nThe type was up to **long**, but now it is extended to the maximum implementation-dependent size.\n\n### Support for floating-point number type size up to \"double\"\n\n### Fixed functions causing buffer overruns\ne.g.\n```cpp\n// ElementPath::toString(char* buffer);\nvoid foo(ElementPath\u0026 path) {\n  char buf[32];\n  path.toString(buf); // So dangerous! if path string length over 32.\n}\n```\nChanging toString arguments and return Values.\n```cpp\nstring_t /* String or std::string */ toString() const;\n```\n### What can be const should be const\nArguments for situations where const is appropriate were changed to const.  \nThose that can be const functions were changed to const functions.\n\n### Enhanced internal stack range checks in the parser\nAdded range checks to prevent crashes.\n\n### Added detection and output of errors in the parser\nLog output when internal errors occur and added detection mechanism.\n\n### Added a mechanism to help determine keys and retrieve values\nif elseif elseif elseif elseif elseif elseif elseif elseif elseif elseif elseif elseif ... OMG!  \nAdded a helper for retrive values and a delegation handler for processing per JSON object.  \nsee also [test_element.cpp](test/test_element.cpp), [test_basic.cpp](test/test_basic.cpp)\n\n### Unit test support with GoogleTest\nEven small test cases are useful.\n\n### Add documentation to be generated from source\nDocumentation can be generated by Doxygen.\n\n\n## Installation\ngit clone or download and extract zip file to your library folder.  \nIf you are using PlatformIO, you can write the following to download automatically.\n\n```ini\nlib_deps = https://github.com/GOB52/gob_json.git\n```\n\n## Setting\nThe build option allows you to set several items.\n\n|symbol| description|default value|\n|---|---|---|\n|GOB_JSON_PARSER_BUFFER_MAX_LENGTH| Token buffer size| 256|\n|GOB_JSON_PARSER_KEY_MAX_LENGTH| JSON key token buffer size|32|\n|GOB_JSON_PARSER_STACK_MAX_DEPTH|Maximum nesting level of JSON object/array|20|\n\n```ini\nbuild_flags = -D GOB_JSON_PARSER_BUFFER_MAX_LENGTH=384 \n  -D GOB_JSON_PARSER_KEY_MAX_LENGTH=64\n  -D GOB_JSON_PARSER_STACK_MAX_DEPTH=16\n```\n\n## Usage\nIf you use it like json-streaming-parser2, rename the headers and types to include.\n\n### Header\n|gob_json|json-streaming-parser2|\n|---|---|\n|gob_json.hpp|JsonStreamingParser2.h|\n|gob_json_handler.hpp|JsonHandler.h|\n|gob_json_element_path.hpp|ElementPath.h|\n|gob_json_element_value.hpp|ElementValue.h|\n|gob_json_ardiono.hpp|ArduinoStreamParser.h|\n\n### Class\n|gob_json|json-streaming-parser2|\n|---|---|\n|goblib::json::StreamingParser|JsonStreamingParser|\n|goblib::json::Handler|JsonHandler|\n|goblib::json::ElementPath|ElementPath|\n|goblib::json::ElementValue|ElementValue|\n|goblib::json::arduino::Stream|ArudinoStreamParser|\n\nAbout json-streaming-parser2, see also [JSON Streaming Parser 2 README](README.org.md)\n\nI plan to expand the documentation in the future, but for now, \nplease see [examples](examples/SimpleParser/SimpleParser.ino) and [test](test/test_basic.cpp).\n\n\n## Documents\nYou can make documents by [Doxygen](https://www.doxygen.nl/index.html). Use my [Doxyfile](doc/Doxyfile).  \n\n## UnitTest\nYou can run [GoogleTest](https://google.github.io/googletest/) using [platformio.ini](platformio.ini).\n\n\n## Acknowledgments\nI would like to thank the author and contributors of json-streaming-parser/2 again. I salute your great job.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgob52%2Fgob_json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgob52%2Fgob_json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgob52%2Fgob_json/lists"}