{"id":30281823,"url":"https://github.com/pmunin/jsontransformation","last_synced_at":"2025-08-16T16:55:17.514Z","repository":{"id":65414066,"uuid":"192621713","full_name":"pmunin/JsonTransformation","owner":"pmunin","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-08T05:43:03.000Z","size":16,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-30T03:09:26.628Z","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/pmunin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-18T22:41:59.000Z","updated_at":"2022-12-12T08:54:33.000Z","dependencies_parsed_at":"2023-01-24T14:31:01.613Z","dependency_job_id":null,"html_url":"https://github.com/pmunin/JsonTransformation","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pmunin/JsonTransformation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmunin%2FJsonTransformation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmunin%2FJsonTransformation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmunin%2FJsonTransformation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmunin%2FJsonTransformation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmunin","download_url":"https://codeload.github.com/pmunin/JsonTransformation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmunin%2FJsonTransformation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270742017,"owners_count":24637501,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-16T16:55:15.585Z","updated_at":"2025-08-16T16:55:17.463Z","avatar_url":"https://github.com/pmunin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NuGet version (JsonTransformation)](https://img.shields.io/nuget/v/JsonTransformation.svg?style=flat-square)](https://www.nuget.org/packages/JsonTransformation/)\n[![Build status](https://ci.appveyor.com/api/projects/status/con1nroyjfv6id54?svg=true)](https://ci.appveyor.com/project/pmunin/jsontransformation)\n\n# What is this\n\n.NET Standard library allows to transform source [Newtonsoft.Json.Linq.JToken](https://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_Linq_JToken.htm) object recursively using extendable \"Transformers\"\n\nNote: Current implementation actually MUTATES source node provided for transformation\n\n## Examples:\n\n### Loading linked files:\n```\n//entryFile.json:\n{\n    \"linkedFile\": { \"$file\": \"shared.json\" }\n}\n\n///shared.json:\n{\n    \"myFile2Prop1\": 123\n}\n\n// new JsonTransformationService(new LoadFileTransform()).Transform(entryFileJToken):\n{\n    \"linkedFile\": {\n\t\t\"myFile2Prop1\": 123\n\t}\n}\n\n```\n\n\n### Merging by jpath:\n```\n//file.json:\n{\n    \"templates\": {\n        \"t1\": {\n            \"tp1\": 123,\n            \"tp2\": \"Hello world\"\n        }\n    },\n    \"jobs\": {\n        \"job1\": {\n            \"job1Prop1\": 1235,\n            \"$merge\": \"$.templates.t1\"\n        }\n    }\n}\n\n//new JsonTransformationService(new MergeTransform()).Transform(fileJToken.SelectToken(\"$.jobs.job1\")); \n{\n    \"job1Prop1\": 1235,\n    \"tp1\": 123,\n    \"tp2\": \"Hello world\"\n}\n\n```\n\n### Setting Parameters:\n```\n// file.json:\n{\n    \"templates\": {\n        \"t1\": {\n            \"name\": { \"$useParameter\": \"jobName\" },\n            \"tp1\": 123,\n            \"tp2\": \"Hello world\"\n        }\n    },\n    \"jobs\": {\n        \"job1\": {\n            \"job1Prop1\": 1235,\n            \"$merge\": \"$.templates.t1\",\n            \"$setParameters\": {\n                \"jobName\": \"My Job 1\"\n            }\n        }\n    }\n}\n\n//new JsonTransformationService( new MergeTransform(), new ParametersTransform())\n//\t.Transform(fileJToken.SelectToken(\"$.jobs.job1\")):\n{\n    \"job1Prop1\": 1235,\n    \"name\": \"My Job 1\",\n    \"tp1\": 123,\n    \"tp2\": \"Hello world\"\n}\n\n\n```\n\n\n## Extensibility\n\nIf you need additional transformers, just implement interface ICanTransformJson and add it in ctor parameters of your jsonTransformationService instance.\n\n## Installation\n\nUse nuget package: https://www.nuget.org/packages/JsonTransformation/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmunin%2Fjsontransformation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmunin%2Fjsontransformation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmunin%2Fjsontransformation/lists"}