{"id":13629033,"url":"https://github.com/ignatandrei/RSCG_JSON2Class","last_synced_at":"2025-04-17T04:32:50.266Z","repository":{"id":225076996,"uuid":"764996317","full_name":"ignatandrei/RSCG_JSON2Class","owner":"ignatandrei","description":"Transform any json ( including appsettings ) into a class","archived":false,"fork":false,"pushed_at":"2024-07-09T21:24:00.000Z","size":24,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T00:32:01.454Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ignatandrei.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}},"created_at":"2024-02-29T04:51:48.000Z","updated_at":"2024-03-08T14:08:03.000Z","dependencies_parsed_at":"2024-03-04T08:25:01.470Z","dependency_job_id":null,"html_url":"https://github.com/ignatandrei/RSCG_JSON2Class","commit_stats":null,"previous_names":["ignatandrei/rscg_json2class"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatandrei%2FRSCG_JSON2Class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatandrei%2FRSCG_JSON2Class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatandrei%2FRSCG_JSON2Class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatandrei%2FRSCG_JSON2Class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ignatandrei","download_url":"https://codeload.github.com/ignatandrei/RSCG_JSON2Class/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249316026,"owners_count":21249879,"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-08-01T22:01:01.776Z","updated_at":"2025-04-17T04:32:48.190Z","avatar_url":"https://github.com/ignatandrei.png","language":"C#","funding_links":[],"categories":["Content"],"sub_categories":["122. [RSCG_JSON2Class](https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_JSON2Class) , in the [FilesToCode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) category"],"readme":"# RSCG_JSON2Class\nTransform any json ( including appsettings ) into a class\n\n## Usage\n\nInstall the nuget package into your project\n\n```xml\n\u003cItemGroup\u003e\n  \u003cPackageReference Include=\"RSCG_JSON2Class\" Version=\"2024.2.29.807\" OutputItemType=\"Analyzer\" ReferenceOutputAssembly=\"false\"  /\u003e\n\u003c/ItemGroup\u003e\n\u003cPropertyGroup\u003e\n\t\u003cEmitCompilerGeneratedFiles\u003etrue\u003c/EmitCompilerGeneratedFiles\u003e\n\t\u003cCompilerGeneratedFilesOutputPath\u003e$(BaseIntermediateOutputPath)\\GX\u003c/CompilerGeneratedFilesOutputPath\u003e\n\t\u003cGenerateDocumentationFile\u003eTrue\u003c/GenerateDocumentationFile\u003e\n\u003c/PropertyGroup\u003e\n\n```\n\n\nVerify that the json file is set analyzer ( and , if you want to deserialize, copy to the output directory)\n\n```xml\n\u003cItemGroup\u003e\n  \u003cNone Remove=\"testData.json\" /\u003e\n\u003c/ItemGroup\u003e\n\u003cItemGroup\u003e\n\u003cAdditionalFiles Include=\"testData.json\"\u003e\n\u003cCopyToOutputDirectory\u003ePreserveNewest\u003c/CopyToOutputDirectory\u003e\n\u003c/AdditionalFiles\u003e\n\u003c/ItemGroup\u003e\n\n```\n\nAccess from C# code\n\n```csharp\nusing System.Text.Json;\nvar testData = JsonSerializer.Deserialize\u003cJSON2ClassConsole.SettingsJson.testData\u003e(System.IO.File.ReadAllText(\"testData.json\"));\nArgumentNullException.ThrowIfNull(testData);\nConsole.WriteLine(testData.Logging.LogLevel.Default);\nConsole.WriteLine(testData.DictData.Number_2);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignatandrei%2FRSCG_JSON2Class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fignatandrei%2FRSCG_JSON2Class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignatandrei%2FRSCG_JSON2Class/lists"}