-
Notifications
You must be signed in to change notification settings - Fork 1
Home
MACK Mathieu edited this page Jan 23, 2022
·
2 revisions
Welcome to the JSLTSharp wiki!
Find many sample of transformations here and some descriptions of best practices.
Do not hesitate to contribute or create an issue if you have any question.
Hope this package will help you !
- Add nuget package:
Install-Package JSLTSharp
- In your application, you must instanciate a new JsonTransform object, and call the method 'Transform' to transform your json:
var input = @"{
'field1': 13246.51,
'field2': true
}";
var transformation = @"{
'resultField1': '$.field1->ToInteger()',
'resultField2': '$.field2'
}";
var transformEngine = new JsonTransform();
var result = transformEngine.Transform(input, transformation);
result value :
{
"resultField1": 13246,
"resultField2": true
}