Black.Beard.Jslt 1.0.374

dotnet add package Black.Beard.Jslt --version 1.0.374
                    
NuGet\Install-Package Black.Beard.Jslt -Version 1.0.374
                    
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.374" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Black.Beard.Jslt" Version="1.0.374" />
                    
Directory.Packages.props
<PackageReference Include="Black.Beard.Jslt" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Black.Beard.Jslt --version 1.0.374
                    
#r "nuget: Black.Beard.Jslt, 1.0.374"
                    
#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.
#:package Black.Beard.Jslt@1.0.374
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Black.Beard.Jslt&version=1.0.374
                    
Install as a Cake Addin
#tool nuget:?package=Black.Beard.Jslt&version=1.0.374
                    
Install as a Cake Tool

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.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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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.374 145 12/7/2024
1.0.373 131 12/7/2024
1.0.372 129 11/20/2024
1.0.371 124 11/20/2024
1.0.370 118 11/16/2024
1.0.369 112 11/16/2024
1.0.368 131 11/14/2024
1.0.367 117 11/14/2024
1.0.366 127 11/13/2024
1.0.365 114 11/13/2024
1.0.364 128 11/12/2024
1.0.363 128 11/12/2024
1.0.362 130 11/11/2024
1.0.361 125 11/11/2024
1.0.360 123 11/11/2024
1.0.359 123 11/11/2024
1.0.358 135 11/11/2024
1.0.357 130 11/11/2024
1.0.356 125 11/10/2024
1.0.355 119 11/10/2024
1.0.354 129 10/28/2024
1.0.353 117 10/28/2024
1.0.352 114 10/28/2024
1.0.351 120 10/28/2024
1.0.350 146 5/2/2024
1.0.349 129 5/2/2024
1.0.348 136 5/2/2024
1.0.347 116 5/2/2024
1.0.346 165 4/7/2024
1.0.345 159 4/7/2024
1.0.344 145 4/5/2024
1.0.343 146 4/5/2024
1.0.342 162 4/5/2024
1.0.341 145 4/5/2024
1.0.340 147 4/4/2024
1.0.339 163 4/4/2024
1.0.338 158 4/3/2024
1.0.337 172 4/3/2024
1.0.336 161 4/3/2024
1.0.335 130 4/3/2024
1.0.334 144 4/2/2024
1.0.333 143 4/2/2024
1.0.332 151 4/2/2024
1.0.331 159 4/2/2024
1.0.330 151 4/2/2024
1.0.329 140 4/2/2024
1.0.328 165 4/1/2024
1.0.327 147 4/1/2024
1.0.325 146 4/1/2024
1.0.324 158 4/1/2024
1.0.323 153 4/1/2024
1.0.322 149 3/31/2024
1.0.321 150 3/31/2024
1.0.319 154 3/31/2024
1.0.318 144 3/31/2024
1.0.317 306 3/19/2024
1.0.316 146 3/19/2024
1.0.315 242 3/15/2024
1.0.314 167 3/15/2024
1.0.313 181 3/13/2024
1.0.312 166 3/13/2024
1.0.311 161 3/13/2024
1.0.310 156 3/13/2024
1.0.309 199 3/12/2024
1.0.308 214 3/12/2024
1.0.306 329 3/5/2024
1.0.305 157 3/5/2024
1.0.304 178 3/4/2024
1.0.303 156 3/4/2024
1.0.302 159 3/4/2024
1.0.301 157 3/4/2024
1.0.300 186 3/3/2024
1.0.299 152 3/3/2024
1.0.298 319 2/26/2024
1.0.297 159 2/26/2024
1.0.296 160 2/25/2024
1.0.295 156 2/25/2024
1.0.294 160 2/24/2024
1.0.293 150 2/24/2024
1.0.292 146 2/24/2024
1.0.291 158 2/24/2024
1.0.290 150 2/24/2024
1.0.289 150 2/24/2024
1.0.288 246 2/21/2024
1.0.287 168 2/21/2024
1.0.286 1,856 12/12/2023
1.0.285 161 12/12/2023
1.0.259 1,566 10/17/2023
1.0.258 149 10/17/2023
1.0.257 259 10/13/2023
1.0.256 159 10/13/2023
1.0.255 253 10/10/2023
1.0.254 166 10/10/2023
1.0.253 214 9/19/2023
1.0.252 156 9/19/2023
1.0.251 184 9/13/2023
1.0.250 172 9/13/2023
1.0.245 209 7/26/2023
1.0.244 194 7/26/2023
1.0.243 215 7/19/2023
1.0.242 204 7/19/2023
1.0.241 180 7/11/2023
1.0.240 192 7/11/2023
1.0.239 191 7/7/2023
1.0.238 177 7/7/2023
1.0.237 208 7/6/2023
1.0.236 189 7/6/2023
1.0.235 184 7/6/2023
1.0.234 192 7/6/2023
1.0.232 183 7/5/2023
1.0.231 191 7/5/2023
1.0.230 210 7/5/2023
1.0.229 198 7/5/2023
1.0.228 190 7/5/2023
1.0.227 193 7/5/2023
1.0.226 194 7/4/2023
1.0.225 186 7/4/2023
1.0.224 217 7/3/2023
1.0.223 190 7/3/2023
1.0.222 194 6/30/2023
1.0.221 171 6/30/2023
1.0.220 199 6/30/2023
1.0.219 186 6/30/2023
1.0.218 221 6/17/2023
1.0.217 199 6/17/2023
1.0.214 211 6/6/2023
1.0.213 193 6/6/2023
1.0.212 194 6/6/2023
1.0.211 190 6/6/2023
1.0.206 190 6/5/2023
1.0.205 195 6/5/2023
1.0.204 210 6/2/2023
1.0.203 175 6/2/2023
1.0.202 204 6/2/2023
1.0.201 204 6/2/2023
1.0.190 629 5/27/2022
1.0.189 578 5/27/2022
1.0.188 592 5/23/2022
1.0.187 599 5/23/2022
1.0.186 560 5/18/2022
1.0.185 564 5/18/2022
1.0.184 600 5/18/2022
1.0.183 604 5/18/2022
1.0.182 605 5/17/2022
1.0.181 593 5/17/2022
1.0.180 587 5/11/2022
1.0.179 602 5/11/2022
1.0.178 609 5/6/2022
1.0.177 614 5/6/2022
1.0.176 643 4/2/2022
1.0.175 621 4/2/2022
1.0.174 611 3/24/2022
1.0.173 598 3/24/2022
1.0.172 560 3/23/2022
1.0.171 592 3/23/2022
1.0.170 588 3/23/2022
1.0.169 581 3/23/2022
1.0.168 622 3/21/2022
1.0.167 611 3/21/2022
1.0.166 613 3/19/2022
1.0.165 633 3/19/2022
1.0.164 601 3/17/2022
1.0.163 602 3/17/2022
1.0.162 600 3/17/2022
1.0.161 622 3/17/2022
1.0.160 599 3/16/2022
1.0.159 623 3/16/2022
1.0.158 625 3/7/2022
1.0.157 622 3/7/2022
1.0.156 612 3/6/2022
1.0.155 612 3/6/2022
1.0.154 625 3/6/2022
1.0.153 629 3/6/2022
1.0.152 624 3/6/2022
1.0.151 629 3/6/2022
1.0.150 625 3/6/2022
1.0.149 638 3/6/2022
1.0.148 639 3/5/2022
1.0.147 629 3/5/2022
1.0.146 583 3/5/2022
1.0.145 734 3/5/2022
1.0.144 721 3/5/2022
1.0.143 743 3/5/2022
1.0.142 720 3/5/2022
1.0.140 626 3/5/2022
1.0.139 604 3/5/2022
1.0.137 609 3/5/2022
1.0.136 589 3/5/2022
1.0.135 479 3/5/2022
1.0.134 485 3/5/2022
1.0.133 618 3/5/2022
1.0.132 621 3/5/2022
1.0.131 604 3/5/2022
1.0.130 630 3/5/2022
1.0.128 610 3/5/2022
1.0.126 482 3/5/2022
1.0.125 508 3/4/2022
1.0.124 503 3/4/2022
1.0.123 507 3/4/2022
1.0.122 517 3/4/2022
1.0.120 512 3/4/2022
1.0.119 500 3/4/2022
1.0.118 491 3/3/2022
1.0.117 486 3/3/2022
1.0.116 482 3/3/2022
1.0.115 503 3/3/2022
1.0.114 511 2/21/2022
1.0.113 488 2/21/2022
1.0.112 523 2/19/2022
1.0.111 492 2/18/2022
1.0.110 499 2/18/2022
1.0.109 494 2/18/2022
1.0.107 490 2/17/2022
1.0.106 1,616 2/17/2022
1.0.105 531 1/18/2022
1.0.104 523 1/18/2022
1.0.103 365 12/20/2021
1.0.102 367 12/20/2021
1.0.101 351 12/20/2021
1.0.100 354 12/20/2021
1.0.99 335 12/20/2021
1.0.98 318 12/20/2021
1.0.96 351 12/18/2021
1.0.94 397 12/18/2021
1.0.93 367 12/18/2021
1.0.92 386 12/18/2021
1.0.0 506 3/5/2022