Skip to content
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 !

How to start ?

  1. Add nuget package:

Install-Package JSLTSharp

  1. 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
}
Clone this wiki locally