{"id":21811174,"url":"https://github.com/mathieumack/jsltsharp","last_synced_at":"2025-04-13T22:24:29.041Z","repository":{"id":44761322,"uuid":"420716647","full_name":"mathieumack/JSLTSharp","owner":"mathieumack","description":"This library let you to apply some transformations on a json object. Like an xslt document, transform a json string to another","archived":false,"fork":false,"pushed_at":"2024-11-23T16:43:11.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T09:42:21.867Z","etag":null,"topics":["csharp","jslt","json"],"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/mathieumack.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":"2021-10-24T15:06:24.000Z","updated_at":"2024-11-23T16:43:12.000Z","dependencies_parsed_at":"2022-08-29T22:51:14.513Z","dependency_job_id":null,"html_url":"https://github.com/mathieumack/JSLTSharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieumack%2FJSLTSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieumack%2FJSLTSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieumack%2FJSLTSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieumack%2FJSLTSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathieumack","download_url":"https://codeload.github.com/mathieumack/JSLTSharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248789977,"owners_count":21161923,"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":["csharp","jslt","json"],"created_at":"2024-11-27T13:43:37.323Z","updated_at":"2025-04-13T22:24:28.764Z","avatar_url":"https://github.com/mathieumack.png","language":"C#","funding_links":["https://www.buymeacoffee.com/mathieumack"],"categories":[],"sub_categories":[],"readme":"# JSLTSharp\nThis library let you to apply some transformations on a json object. Like an xslt document, transform a json string to another\n\nI have created this library in .NET which enables the transformation of JSON documents using very a simple transformation language like an xslt transformation for XML document, but for JSON.\nI've also created this package as the excellent [https://github.com/WorkMaze/JUST.net](JUST.net) package does not responds exactly to my needs, and in case of big volumetry of data, performances was not good for my needs.\n\n==========\n\n# Onboarding Instructions \n\n## Installation\n\n1. Add nuget package: \n\n\u003e Install-Package JSLTSharp\n\n2. In your application, you must instanciate a new JsonTransform object, and call the method 'Transform' to transform your json: \n\n```c#\nvar input = @\"{\n        'field1': 13246.51,\n        'field2': true\n    }\";\n    \nvar transformation = @\"{\n        'resultField1': '$.field1-\u003eToInteger()',\n        'resultField2': '$.field2'\n    }\";\n\nvar transformEngine = new JsonTransform();\nvar result = transformEngine.Transform(input, transformation);\n```\n\nresult value :\n\n```json\n{\n    \"resultField1\": 13246,\n    \"resultField2\": true\n}\n```\n\n## Selectors\nIn your transformation description, you can refers to fields by using a JsonPath expression\n\nEx :\n```json\n{\n    \"resultField1\": \"$.field1-\u003eToInteger()\",\n    \"resultField2\": \"$.field2\"\n}\n```\n$.field1 refers to to the property named field1 on the json input.\n\n:information_source: If you have to test your selector, you can use the online tool https://jsonpath.com/.\n\n# Create my own function\n\nThe package can be extended by using your own functions. Code your own C# function, and register it on the service collection of your application. More details on the Wiki.\n\n# IC\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=mathieumack_JSLTSharp\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=mathieumack_JSLTSharp)\n[![.NET](https://github.com/mathieumack/JSLTSharp/actions/workflows/ci.yml/badge.svg)](https://github.com/mathieumack/JSLTSharp/actions/workflows/ci.yml)\n[![NuGet package](https://buildstats.info/nuget/JSLTSharp?includePreReleases=true)](https://nuget.org/packages/JSLTSharp)\n\n# Documentation : I want more\n\nDo not hesitate to check unit tests on the solution. It's a good way to check how transformations are tested.\n\nAlso, to get more samples, go to the [Wiki](https://github.com/mathieumack/JSLTSharp/wiki). \n\nDo not hesitate to contribute.\n\n\n# Support / Contribute\nIf you have any questions, problems or suggestions, create an issue or fork the project and create a Pull Request.\n\nYou want more ? Feel free to create an issue or contribute by adding new functionnalities by forking the project and create a pull request.\n\nAnd if you like this project, don't forget to star it !\n\nYou can also support me with a coffee :\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/mathieumack)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieumack%2Fjsltsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathieumack%2Fjsltsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieumack%2Fjsltsharp/lists"}