{"id":16931916,"url":"https://github.com/catcherwong/easyjsont","last_synced_at":"2025-10-15T23:22:48.382Z","repository":{"id":130595157,"uuid":"158903798","full_name":"catcherwong/EasyJsonT","owner":"catcherwong","description":"🌻JSON transform.","archived":false,"fork":false,"pushed_at":"2019-03-27T12:32:26.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T11:11:59.600Z","etag":null,"topics":["addnodes","filter","json","jsonhelper","rename","transform"],"latest_commit_sha":null,"homepage":"","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/catcherwong.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":"2018-11-24T04:58:36.000Z","updated_at":"2019-03-27T12:32:28.000Z","dependencies_parsed_at":"2023-06-09T00:45:20.530Z","dependency_job_id":null,"html_url":"https://github.com/catcherwong/EasyJsonT","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catcherwong%2FEasyJsonT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catcherwong%2FEasyJsonT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catcherwong%2FEasyJsonT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catcherwong%2FEasyJsonT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catcherwong","download_url":"https://codeload.github.com/catcherwong/EasyJsonT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235648368,"owners_count":19023610,"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":["addnodes","filter","json","jsonhelper","rename","transform"],"created_at":"2024-10-13T20:44:59.339Z","updated_at":"2025-10-07T17:32:10.840Z","avatar_url":"https://github.com/catcherwong.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyJsonT\n\nEasyJsonT is an open source JSON library that help us to transform a JSON string to your expected.\n\n## CI Build Status\n\n| Platform | Build Server | Status  |\n|--------- |------------- |---------|\n| AppVeyor |  Windows/Ubuntu1804 |[![Build status](https://ci.appveyor.com/api/projects/status/515995895xeunq4o/branch/master?svg=true)](https://ci.appveyor.com/project/catcherwong/easyjsont/branch/master) |\n\n## Nuget Packages\n\n| Package Name |  Version | Downloads\n|--------------|  ------- | ----\n| EasyJsonT | ![](https://img.shields.io/nuget/v/EasyJsonT.svg) | ![](https://img.shields.io/nuget/dt/EasyJsonT.svg)\n\n## What EasyJsonT Do ?\n\n### Filter Nodes\n\nFilter the nodes that your want to remove or reserve.\n\n### Add Nodes\n\nAdd some additional nodes to a exist JSON string or rebuild itself as a new node.\n\n### Rename Nodes\n\nRename the nodes based on your needy.\n\n### Translate Values For Nodes\n\nChange the value of nodes based on what you want.\n\n## Basic Usage\n\n### Filter Nodes\n\n```cs\nvar filterNodes = new List\u003cstring\u003e { \"UserName\", \"age\" };\n\nvar json = @\"{'userName':'catcherwong','age':18,'hobbies':['write','running']}\";\nvar filterJsonResult11 = JsonTProvider.FilterNodes(json, filterNodes, true);\n//{\"hobbies\": [\"write, \"running\"]}\nvar filterJsonResult12 = JsonTProvider.FilterNodes(json, filterNodes, false);\n//{\"userName\": \"catcherwong\", \"age\": 18}\n```\n\n### Add Nodes\n\n```cs\nvar addNodesDict = new Dictionary\u003cstring, object\u003e\n{\n    {\"age\",18},\n    {\"subObj\",new{prop1=\"123\"}},\n    {\"subArray\",new List\u003cstring\u003e {\"a\",\"b\"}}\n};\n\nvar json = @\"{'userName':'catcherwong'}\";\nvar res = JsonTProvider.AddNodes(json, addNodesDict);\n//{\"userName\":\"catcherwong\",\"age\":18,\"subObj\":{\"prop1\":\"123\"},\"subArray\":[\"a\",\"b\"]}\n```\n\n### Rename Nodes\n\n```cs\nvar renameDict = new Dictionary\u003cstring, string\u003e\n{\n    {\"name\",\"userName\"},{\"nl\",\"age\"}\n};\n\nvar json = @\"{'name':'catcherwong','nl':18}\";\nvar res = JsonTProvider.RenameNodes(json, renameDict);\n//{\"userName\":\"catcherwong\",\"age\":18}          \n```\n\n### Translate Values For Nodes\n\n```cs\nvar translateValueDict = new Dictionary\u003cstring, Dictionary\u003cobject, object\u003e\u003e\n{\n    {\"Code\",new Dictionary\u003cobject, object\u003e{{-1,0},{-2,1}}},\n    {\"messAge\",new Dictionary\u003cobject, object\u003e{{\"yes\",\"Success\"},{\"no\",\"Error\"}}}\n};\n\nvar json = @\"{'code':-1,'message':'yes'}\";\nvar res = JsonTProvider.TranslateValues(json, translateValueDict);\n//{\"code\":0,\"message\":\"Success\"}\n```\n\nFor more usages, please visit the [sample project](https://github.com/catcherwong/EasyJsonT/blob/master/sample/EasyJsonT.Demo/Program.cs)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatcherwong%2Feasyjsont","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatcherwong%2Feasyjsont","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatcherwong%2Feasyjsont/lists"}