Black.Beard.Jslt 1.0.302

There is a newer version of this package available.
See the version list below for details.
dotnet add package Black.Beard.Jslt --version 1.0.302                
NuGet\Install-Package Black.Beard.Jslt -Version 1.0.302                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Black.Beard.Jslt" Version="1.0.302" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Black.Beard.Jslt --version 1.0.302                
#r "nuget: Black.Beard.Jslt, 1.0.302"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Black.Beard.Jslt as a Cake Addin
#addin nuget:?package=Black.Beard.Jslt&version=1.0.302

// Install Black.Beard.Jslt as a Cake Tool
#tool nuget:?package=Black.Beard.Jslt&version=1.0.302                

Implementation of jslt language in DOTNET. Use a template for transform Json document to another json document.

The following sample for help you to easy start.


    using Bb;
    using Bb.Json.Jslt.Services;
    using System.Text;

    public static class TemplateHelper
    {

        /// <summary>
        /// Call this method for load anc compile template
        /// </summary>
        /// <param name="file">file that content the template jslt</param>
        /// <param name="withDebug">if true, activate the debug mode</param>
        /// <param name="paths">that for auto detect extended services</param>
        /// <param name="services">add extended services</param>
        /// <returns></returns>
        public static JsltTemplate LoadTemplate(this FileInfo file, bool withDebug, string[] paths, params Type[] services)
        {
            var content = file.FullName.LoadFile();
            StringBuilder sb = new StringBuilder();
            var _template = sb.GetTransformProvider(withDebug, file.FullName, paths, services);
            return _template;
        }

        public static JsltTemplate GetTransformProvider(this StringBuilder sb, bool withDebug, string templatefilename, string[] paths, params Type[] services)
        {
            var provider = GetProvider(paths, services);
            JsltTemplate template = provider.GetTemplate(sb, withDebug, templatefilename);
            return template;
        }

        public static TemplateTransformProvider GetProvider(string[] paths, params Type[] services)
        {

            var configuration = new TranformJsonAstConfiguration();

            // If you haven't added Package "Black.Beard.Jslt.Services" you must comment this line.
            // configuration.Assemblies.Add(typeof(Bb.Jslt.Services.Services).Assembly);

            if (paths != null)
                foreach (var item in paths)
                    if (!string.IsNullOrEmpty(item))
                        configuration.Paths.Add(item);

            foreach (var item in services)
                configuration.Services.ServiceDiscovery.AddService(item);

            TemplateTransformProvider Templateprovider = new TemplateTransformProvider(configuration);

            return Templateprovider;

        }

    }


Now a sample for use template


    var file = new FileInfo(rulePayload);
    file.Refresh();
    if (!file.Exists)
        throw new Exception($"the path '{file}' can't be resolved.");

    // Build template
    var _template = file.LoadTemplate(false, new string[0]);


    // create an instance of sources with no datas
    var src = Sources.GetEmpty();

    // inject data in the model, for accessing by json path '$"
    // var src2 = new Sources(SourceJson.GetFromText("{}"));
    
    // Add a value for for accessing from the template
    src.Variables.Add("My value", new JValue(1));

    // execute template but not apply output directives.
    var ctx = _template.Transform(src);

    // execute template and apply output directives.
    var result = _template.TransformForOutput(src);

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Black.Beard.Jslt:

Package Downloads
Black.Beard.Jslt.Services

support extended method(loading excel, html, multicsv, sql).

Black.Beard.Jslt.Symbol

Implementation of jslt language in DOTNET. Use a template for transform Json document to another json document.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.368 0 11/14/2024
1.0.367 0 11/14/2024
1.0.366 68 11/13/2024
1.0.365 55 11/13/2024
1.0.364 62 11/12/2024
1.0.363 61 11/12/2024
1.0.362 72 11/11/2024
1.0.361 69 11/11/2024
1.0.360 67 11/11/2024
1.0.359 69 11/11/2024
1.0.358 76 11/11/2024
1.0.357 67 11/11/2024
1.0.356 64 11/10/2024
1.0.355 62 11/10/2024
1.0.354 74 10/28/2024
1.0.353 72 10/28/2024
1.0.352 69 10/28/2024
1.0.351 66 10/28/2024
1.0.350 110 5/2/2024
1.0.349 93 5/2/2024
1.0.348 101 5/2/2024
1.0.347 78 5/2/2024
1.0.346 131 4/7/2024
1.0.345 119 4/7/2024
1.0.344 108 4/5/2024
1.0.343 111 4/5/2024
1.0.342 125 4/5/2024
1.0.341 106 4/5/2024
1.0.340 109 4/4/2024
1.0.339 122 4/4/2024
1.0.338 120 4/3/2024
1.0.337 133 4/3/2024
1.0.336 122 4/3/2024
1.0.335 94 4/3/2024
1.0.334 111 4/2/2024
1.0.333 102 4/2/2024
1.0.332 112 4/2/2024
1.0.331 119 4/2/2024
1.0.330 110 4/2/2024
1.0.329 103 4/2/2024
1.0.328 125 4/1/2024
1.0.327 107 4/1/2024
1.0.325 106 4/1/2024
1.0.324 119 4/1/2024
1.0.323 113 4/1/2024
1.0.322 101 3/31/2024
1.0.321 106 3/31/2024
1.0.319 115 3/31/2024
1.0.318 107 3/31/2024
1.0.317 257 3/19/2024
1.0.316 111 3/19/2024
1.0.315 208 3/15/2024
1.0.314 130 3/15/2024
1.0.313 146 3/13/2024
1.0.312 130 3/13/2024
1.0.311 124 3/13/2024
1.0.310 119 3/13/2024
1.0.309 163 3/12/2024
1.0.308 178 3/12/2024
1.0.306 292 3/5/2024
1.0.305 118 3/5/2024
1.0.304 136 3/4/2024
1.0.303 121 3/4/2024
1.0.302 125 3/4/2024
1.0.301 116 3/4/2024
1.0.300 144 3/3/2024
1.0.299 108 3/3/2024
1.0.298 279 2/26/2024
1.0.297 120 2/26/2024
1.0.296 118 2/25/2024
1.0.295 118 2/25/2024
1.0.294 128 2/24/2024
1.0.293 114 2/24/2024
1.0.292 112 2/24/2024
1.0.291 123 2/24/2024
1.0.290 110 2/24/2024
1.0.289 113 2/24/2024
1.0.288 206 2/21/2024
1.0.287 125 2/21/2024
1.0.286 1,823 12/12/2023
1.0.285 125 12/12/2023
1.0.259 1,544 10/17/2023
1.0.258 128 10/17/2023
1.0.257 237 10/13/2023
1.0.256 137 10/13/2023
1.0.255 233 10/10/2023
1.0.254 145 10/10/2023
1.0.253 184 9/19/2023
1.0.252 132 9/19/2023
1.0.251 156 9/13/2023
1.0.250 148 9/13/2023
1.0.245 180 7/26/2023
1.0.244 165 7/26/2023
1.0.243 181 7/19/2023
1.0.242 173 7/19/2023
1.0.241 150 7/11/2023
1.0.240 160 7/11/2023
1.0.239 161 7/7/2023
1.0.238 148 7/7/2023
1.0.237 174 7/6/2023
1.0.236 158 7/6/2023
1.0.235 151 7/6/2023
1.0.234 159 7/6/2023
1.0.232 152 7/5/2023
1.0.231 162 7/5/2023
1.0.230 178 7/5/2023
1.0.229 170 7/5/2023
1.0.228 158 7/5/2023
1.0.227 164 7/5/2023
1.0.226 162 7/4/2023
1.0.225 153 7/4/2023
1.0.224 184 7/3/2023
1.0.223 156 7/3/2023
1.0.222 159 6/30/2023
1.0.221 140 6/30/2023
1.0.220 164 6/30/2023
1.0.219 152 6/30/2023
1.0.218 183 6/17/2023
1.0.217 162 6/17/2023
1.0.214 164 6/6/2023
1.0.213 154 6/6/2023
1.0.212 154 6/6/2023
1.0.211 152 6/6/2023
1.0.206 149 6/5/2023
1.0.205 148 6/5/2023
1.0.204 171 6/2/2023
1.0.203 138 6/2/2023
1.0.202 166 6/2/2023
1.0.201 161 6/2/2023
1.0.190 578 5/27/2022
1.0.189 525 5/27/2022
1.0.188 537 5/23/2022
1.0.187 546 5/23/2022
1.0.186 507 5/18/2022
1.0.185 509 5/18/2022
1.0.184 550 5/18/2022
1.0.183 551 5/18/2022
1.0.182 551 5/17/2022
1.0.181 542 5/17/2022
1.0.180 536 5/11/2022
1.0.179 546 5/11/2022
1.0.178 559 5/6/2022
1.0.177 560 5/6/2022
1.0.176 587 4/2/2022
1.0.175 564 4/2/2022
1.0.174 555 3/24/2022
1.0.173 544 3/24/2022
1.0.172 502 3/23/2022
1.0.171 536 3/23/2022
1.0.170 528 3/23/2022
1.0.169 524 3/23/2022
1.0.168 566 3/21/2022
1.0.167 554 3/21/2022
1.0.166 556 3/19/2022
1.0.165 573 3/19/2022
1.0.164 544 3/17/2022
1.0.163 546 3/17/2022
1.0.162 543 3/17/2022
1.0.161 562 3/17/2022
1.0.160 543 3/16/2022
1.0.159 566 3/16/2022
1.0.158 567 3/7/2022
1.0.157 565 3/7/2022
1.0.156 554 3/6/2022
1.0.155 553 3/6/2022
1.0.154 568 3/6/2022
1.0.153 568 3/6/2022
1.0.152 563 3/6/2022
1.0.151 568 3/6/2022
1.0.150 561 3/6/2022
1.0.149 581 3/6/2022
1.0.148 578 3/5/2022
1.0.147 571 3/5/2022
1.0.146 525 3/5/2022
1.0.145 676 3/5/2022
1.0.144 667 3/5/2022
1.0.143 682 3/5/2022
1.0.142 665 3/5/2022
1.0.140 566 3/5/2022
1.0.139 547 3/5/2022
1.0.137 550 3/5/2022
1.0.136 532 3/5/2022
1.0.135 424 3/5/2022
1.0.134 426 3/5/2022
1.0.133 560 3/5/2022
1.0.132 564 3/5/2022
1.0.131 548 3/5/2022
1.0.130 573 3/5/2022
1.0.128 550 3/5/2022
1.0.126 425 3/5/2022
1.0.125 450 3/4/2022
1.0.124 447 3/4/2022
1.0.123 448 3/4/2022
1.0.122 457 3/4/2022
1.0.120 457 3/4/2022
1.0.119 443 3/4/2022
1.0.118 433 3/3/2022
1.0.117 427 3/3/2022
1.0.116 425 3/3/2022
1.0.115 448 3/3/2022
1.0.114 454 2/21/2022
1.0.113 432 2/21/2022
1.0.112 467 2/19/2022
1.0.111 428 2/18/2022
1.0.110 442 2/18/2022
1.0.109 438 2/18/2022
1.0.107 431 2/17/2022
1.0.106 965 2/17/2022
1.0.105 474 1/18/2022
1.0.104 466 1/18/2022
1.0.103 304 12/20/2021
1.0.102 308 12/20/2021
1.0.101 293 12/20/2021
1.0.100 288 12/20/2021
1.0.99 275 12/20/2021
1.0.98 260 12/20/2021
1.0.96 292 12/18/2021
1.0.94 334 12/18/2021
1.0.93 310 12/18/2021
1.0.92 327 12/18/2021
1.0.0 446 3/5/2022