{"id":19436480,"url":"https://github.com/beached/daw_json_link_describe","last_synced_at":"2025-04-24T21:31:21.950Z","repository":{"id":40494125,"uuid":"488482903","full_name":"beached/daw_json_link_describe","owner":"beached","description":"Library that allows JSON Link to serialize types mapped by boost.describe","archived":false,"fork":false,"pushed_at":"2022-05-24T02:33:00.000Z","size":39,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"release","last_synced_at":"2023-04-02T12:28:30.232Z","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":"other","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}},"created_at":"2022-05-04T06:54:00.000Z","updated_at":"2022-09-19T06:25:25.000Z","dependencies_parsed_at":"2022-08-09T22:16:29.584Z","dependency_job_id":null,"html_url":"https://github.com/beached/daw_json_link_describe","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fdaw_json_link_describe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fdaw_json_link_describe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fdaw_json_link_describe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fdaw_json_link_describe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beached","download_url":"https://codeload.github.com/beached/daw_json_link_describe/tar.gz/refs/heads/release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223968280,"owners_count":17233445,"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:11:23.885Z","updated_at":"2024-11-10T15:11:24.333Z","avatar_url":"https://github.com/beached.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Example of how to use Boost.Describe descriptions as a way to map aggregates\n\nSee tests/src folder for a working example\n\nRequires C++17 and uses [DAW JSON Link](https://github.com/beached/daw_json_link) v3 and [Boost.Describe](https://www.boost.org/doc/libs/1_79_0/libs/describe/doc/html/describe.html)\n\nTo describe a struct, only public members are supported, see the Boost.Describe documentation. It will be similar to\n\n```cpp\nstruct X {\n  int m1;\n  int m2;\n};\nBOOST_DESCRIBE_STRUCT( X, ( ), ( m1, m2 ) )\n\nint main( ) {\n  std::string_view json_doc = R\"json(\n  {\n    \"m1\": 55,\n    \"m2\": 123\n  }\n  )json\";\n\n  auto val = daw::json::from_json\u003cX\u003e( json_doc );\n  assert( val.m1 == 55 );\n  assert( val.m2 == 123 );\n  puts( daw::json::to_json( val ).c_str( ) );\n}\n```\n\nThe specialization of `daw::json::use_boost_describe` is necessary. After this from_json and to_json will work with the\nmapped type\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeached%2Fdaw_json_link_describe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeached%2Fdaw_json_link_describe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeached%2Fdaw_json_link_describe/lists"}