{"id":13589392,"url":"https://github.com/slowburn-dev/DataConfig","last_synced_at":"2025-04-08T09:32:43.872Z","repository":{"id":43168095,"uuid":"352234745","full_name":"slowburn-dev/DataConfig","owner":"slowburn-dev","description":"Unreal Engine JSON/MsgPack serialization framework","archived":false,"fork":false,"pushed_at":"2024-12-25T04:32:14.000Z","size":4087,"stargazers_count":193,"open_issues_count":2,"forks_count":28,"subscribers_count":7,"default_branch":"release","last_synced_at":"2024-12-25T05:24:05.967Z","etag":null,"topics":["json","msgpack","ue4","ue5","unreal-engine","unreal-engine-4","unrealengine"],"latest_commit_sha":null,"homepage":"https://slowburn.dev/dataconfig/","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/slowburn-dev.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":"2021-03-28T03:48:34.000Z","updated_at":"2024-12-25T04:28:09.000Z","dependencies_parsed_at":"2024-01-16T21:57:30.367Z","dependency_job_id":"19682681-7c02-489f-adce-994e51380499","html_url":"https://github.com/slowburn-dev/DataConfig","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slowburn-dev%2FDataConfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slowburn-dev%2FDataConfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slowburn-dev%2FDataConfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slowburn-dev%2FDataConfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slowburn-dev","download_url":"https://codeload.github.com/slowburn-dev/DataConfig/tar.gz/refs/heads/release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247814172,"owners_count":21000514,"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":["json","msgpack","ue4","ue5","unreal-engine","unreal-engine-4","unrealengine"],"created_at":"2024-08-01T16:00:29.492Z","updated_at":"2025-04-08T09:32:43.863Z","avatar_url":"https://github.com/slowburn-dev.png","language":"C++","funding_links":[],"categories":["Serializing","Game Development"],"sub_categories":["Unreal Engine: Resources"],"readme":"# DataConfig\n\n__Serialization framework for Unreal Engine that just works!__\n\nUnreal Engine features a powerful [Property System][1] which implements C++ runtime reflection. **DataConfig** is a serialization framework build on top of it. Notably features:\n\n- Out of the box JSON/MsgPack read write.\n- Full support for UPROPERTY()/UCLASS()/USTRUCT()/UENUM().\n- Pull/Push styled API for verbatim data access and lossless type infomation.\n- Designed as a collection of tools that can be easily extended to support other formats.\n\n## Integration\n\nDownload the latest [DataConfig plugin](../../releases/latest) to get started.\n[More details here][4].\n\n## Documentation\n\nSee [DataConfig Book][2] for details.\n\n## Example\n\nGiven a struct annotated and processed with Unreal's Property System:\n\n```c++\nUENUM()\nenum class EDcTestExampleEnum\n{\n    Foo, Bar, Baz\n};\n\nUSTRUCT()\nstruct FDcTestExampleStruct\n{\n    GENERATED_BODY()\n    UPROPERTY() FString StrField;\n    UPROPERTY() EDcTestExampleEnum EnumField;\n    UPROPERTY() TArray\u003cFColor\u003e Colors;\n};\n```\n\n**DataConfig** can deserialize an instance from JSON with the snippet below:\n\n```c++\nFString Str = TEXT(R\"(\n    {\n        \"StrField\" : \"Lorem ipsum dolor sit amet\",\n        \"EnumField\" : \"Bar\",\n        \"Colors\" : [\n            \"#FF0000FF\", \"#00FF00FF\", \"#0000FFFF\"\n        ]\n    }\n)\");\n\nFDcTestExampleStruct Dest;\n\n//  create and setup a deserializer\nFDcDeserializer Deserializer;\nDcSetupJsonDeserializeHandlers(Deserializer);\nDeserializer.AddPredicatedHandler(\n    FDcDeserializePredicate::CreateStatic(DcExtra::PredicateIsColorStruct),\n    FDcDeserializeDelegate::CreateStatic(DcExtra::HandlerColorDeserialize)\n);\n\n//  prepare deserialize context\nFDcPropertyDatum Datum(\u0026Dest);\nFDcJsonReader Reader(Str);\nFDcPropertyWriter Writer(Datum);\n\nFDcDeserializeContext Ctx;\nCtx.Reader = \u0026Reader;\nCtx.Writer = \u0026Writer;\nCtx.Deserializer = \u0026Deserializer;\nDC_TRY(Ctx.Prepare());\n\n//  kick off deserialization\nDC_TRY(Deserializer.Deserialize(Ctx));\n\n//  validate results\ncheck(Dest.StrField == TEXT(\"Lorem ipsum dolor sit amet\"));\ncheck(Dest.EnumField == EDcTestExampleEnum::Bar);\ncheck(Dest.Colors[0] == FColor::Red);\ncheck(Dest.Colors[1] == FColor::Green);\ncheck(Dest.Colors[2] == FColor::Blue);\n```\n\nNote that enum is deserialized by its name and `FColor` is deserialized from a html color string like `#RRGGBBAA`.\n\nSay if we accidentally mistyped the `EnumField` value:\n\n```json\n{\n    \"StrField\" : \"Lorem ipsum dolor sit amet\",\n    \"EnumField\" : \"Far\",\n```\n\n**DataConfig** would fail gracefully with diagnostics:\n\n```\n# DataConfig Error: Enum name not found in enum type: EDcTestExampleEnum, Actual: 'Far'\n- [JsonReader] --\u003e \u003cin-memory\u003e4:25\n   2 |    {\n   3 |        \"StrField\" : \"Lorem ipsum dolor sit amet\",\n   4 |        \"EnumField\" : \"Far\",\n     |                           ^\n   5 |        \"Colors\" : [\n   6 |            \"#FF0000FF\", \"#00FF00FF\", \"#0000FFFF\"\n- [PropertyWriter] Writing property: (FDcTestExampleStruct)$root.(EEDcTestExampleEnum)EnumField\n```\n## License\n\nDataConfig is released under MIT License.\n\nIt would be trememdously helpful if you credit us in your projects. See the [license page][3] for details.\n\n[1]:https://www.unrealengine.com/en-US/blog/unreal-property-system-reflection \"Unreal Property System (Reflection)\"\n[2]:https://slowburn.dev/dataconfig \"DataConfig Book\"\n[3]:https://slowburn.dev/dataconfig/License \"DataConfig Book - License\"\n[4]:https://slowburn.dev/dataconfig/Integration.html#integrate-dataconfig-plugin \"DataConfig Book - Integration\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslowburn-dev%2FDataConfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslowburn-dev%2FDataConfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslowburn-dev%2FDataConfig/lists"}