{"id":19436354,"url":"https://github.com/beached/parse_json","last_synced_at":"2025-06-26T20:32:40.094Z","repository":{"id":149955374,"uuid":"58166739","full_name":"beached/parse_json","owner":"beached","description":"Serialize to/deserialize from json file and/or parse json file to a variant object","archived":false,"fork":false,"pushed_at":"2022-05-28T04:59:25.000Z","size":456,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T06:46:35.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beached.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}},"created_at":"2016-05-05T23:22:47.000Z","updated_at":"2022-03-24T17:31:47.000Z","dependencies_parsed_at":"2023-05-05T06:03:40.559Z","dependency_job_id":null,"html_url":"https://github.com/beached/parse_json","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/beached/parse_json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fparse_json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fparse_json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fparse_json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fparse_json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beached","download_url":"https://codeload.github.com/beached/parse_json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fparse_json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262139680,"owners_count":23265207,"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":[],"created_at":"2024-11-10T15:10:45.072Z","updated_at":"2025-06-26T20:32:40.042Z","avatar_url":"https://github.com/beached.png","language":"C++","readme":"# Parse Json \u0026 json_link\n\nThis is mainly a serialization/deserialization library that allows your to easily use json as the transport medium.\n\n```c++\n#include \u003ccstdlib\u003e\n#include \u003cstring\u003e\n\n#include \u003cdaw/json/daw_json_link.h\u003e\n\nstruct config_t : public daw::json::json_link\u003cconfig_t\u003e {\n\tint port;\n\tstd::string url_path;\n\n\tconfig_t( ) : daw::json::json_link\u003cconfig_t\u003e{}, port{8080}, url_path{\"/\"} {}\n\n\tconfig_t( config_t const \u0026other ) = default;\n\tconfig_t( config_t \u0026\u0026other ) = default;\n\tconfig_t \u0026operator=( config_t const \u0026 ) = default;\n\tconfig_t \u0026operator=( config_t \u0026\u0026 ) = default;\n\t~config_t( ) = default;\n\n\tstatic void map_to_json( ) {\n\t\tjson_link_integer( \"port\", port );\n\t\tjson_link_string( \"url_path\", url_path );\n\t}\n};\n\nint main( int argc, char **argv ) {\n\tconfig_t config{};\n\tif( argc \u003e 1 ) {\n\t\tconfig = daw::json::from_file\u003cconfig_t\u003e( argv[1] );\n\t} else {\n\t\tstd::string path = argv[0] + \".json\";\n\t\tdaw::json::to_file\u003cconfig_t\u003e( path );\n\t}\n\n\treturn EXIT_SUCCESS;\n}\n```\n\nAs you can see, the requirement is to inherit from the json_link class with the current class as a template parameter.  And then, use the appropriate json_link_... command to give it a name and a variable to link to within a static method called map_to_json( ).\n\n\nThe order of the object element names is sorted in lexigraphical order of the codepoints.  This may or may not make sense depending on the situation \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeached%2Fparse_json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeached%2Fparse_json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeached%2Fparse_json/lists"}