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.
paket add Black.Beard.Jslt --version 1.0.374
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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.
// Install Black.Beard.Jslt as a Cake Addin #addin nuget:?package=Black.Beard.Jslt&version=1.0.374 // Install Black.Beard.Jslt as a Cake Tool #tool nuget:?package=Black.Beard.Jslt&version=1.0.374
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Antlr4.Runtime.Standard (>= 4.9.3)
- Black.Beard.Analysis (>= 1.0.131)
- Black.Beard.ComponentModel (>= 1.0.124)
- Black.Beard.Helpers.Randoms (>= 2.0.47)
- Black.Beard.Roslyn (>= 1.0.131)
- System.CodeDom (>= 9.0.0)
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 | 97 | 12/7/2024 |
1.0.373 | 93 | 12/7/2024 |
1.0.372 | 96 | 11/20/2024 |
1.0.371 | 77 | 11/20/2024 |
1.0.370 | 82 | 11/16/2024 |
1.0.369 | 79 | 11/16/2024 |
1.0.368 | 97 | 11/14/2024 |
1.0.367 | 85 | 11/14/2024 |
1.0.366 | 94 | 11/13/2024 |
1.0.365 | 81 | 11/13/2024 |
1.0.364 | 93 | 11/12/2024 |
1.0.363 | 91 | 11/12/2024 |
1.0.362 | 101 | 11/11/2024 |
1.0.361 | 95 | 11/11/2024 |
1.0.360 | 93 | 11/11/2024 |
1.0.359 | 94 | 11/11/2024 |
1.0.358 | 104 | 11/11/2024 |
1.0.357 | 90 | 11/11/2024 |
1.0.356 | 93 | 11/10/2024 |
1.0.355 | 91 | 11/10/2024 |
1.0.354 | 94 | 10/28/2024 |
1.0.353 | 86 | 10/28/2024 |
1.0.352 | 83 | 10/28/2024 |
1.0.351 | 84 | 10/28/2024 |
1.0.350 | 120 | 5/2/2024 |
1.0.349 | 101 | 5/2/2024 |
1.0.348 | 109 | 5/2/2024 |
1.0.347 | 88 | 5/2/2024 |
1.0.346 | 139 | 4/7/2024 |
1.0.345 | 129 | 4/7/2024 |
1.0.344 | 116 | 4/5/2024 |
1.0.343 | 120 | 4/5/2024 |
1.0.342 | 135 | 4/5/2024 |
1.0.341 | 116 | 4/5/2024 |
1.0.340 | 119 | 4/4/2024 |
1.0.339 | 136 | 4/4/2024 |
1.0.338 | 128 | 4/3/2024 |
1.0.337 | 141 | 4/3/2024 |
1.0.336 | 130 | 4/3/2024 |
1.0.335 | 104 | 4/3/2024 |
1.0.334 | 119 | 4/2/2024 |
1.0.333 | 113 | 4/2/2024 |
1.0.332 | 122 | 4/2/2024 |
1.0.331 | 129 | 4/2/2024 |
1.0.330 | 122 | 4/2/2024 |
1.0.329 | 112 | 4/2/2024 |
1.0.328 | 135 | 4/1/2024 |
1.0.327 | 117 | 4/1/2024 |
1.0.325 | 114 | 4/1/2024 |
1.0.324 | 127 | 4/1/2024 |
1.0.323 | 121 | 4/1/2024 |
1.0.322 | 119 | 3/31/2024 |
1.0.321 | 123 | 3/31/2024 |
1.0.319 | 125 | 3/31/2024 |
1.0.318 | 117 | 3/31/2024 |
1.0.317 | 268 | 3/19/2024 |
1.0.316 | 121 | 3/19/2024 |
1.0.315 | 216 | 3/15/2024 |
1.0.314 | 140 | 3/15/2024 |
1.0.313 | 156 | 3/13/2024 |
1.0.312 | 140 | 3/13/2024 |
1.0.311 | 134 | 3/13/2024 |
1.0.310 | 127 | 3/13/2024 |
1.0.309 | 173 | 3/12/2024 |
1.0.308 | 186 | 3/12/2024 |
1.0.306 | 300 | 3/5/2024 |
1.0.305 | 126 | 3/5/2024 |
1.0.304 | 148 | 3/4/2024 |
1.0.303 | 129 | 3/4/2024 |
1.0.302 | 133 | 3/4/2024 |
1.0.301 | 128 | 3/4/2024 |
1.0.300 | 157 | 3/3/2024 |
1.0.299 | 118 | 3/3/2024 |
1.0.298 | 287 | 2/26/2024 |
1.0.297 | 132 | 2/26/2024 |
1.0.296 | 130 | 2/25/2024 |
1.0.295 | 127 | 2/25/2024 |
1.0.294 | 136 | 2/24/2024 |
1.0.293 | 124 | 2/24/2024 |
1.0.292 | 120 | 2/24/2024 |
1.0.291 | 131 | 2/24/2024 |
1.0.290 | 122 | 2/24/2024 |
1.0.289 | 123 | 2/24/2024 |
1.0.288 | 214 | 2/21/2024 |
1.0.287 | 134 | 2/21/2024 |
1.0.286 | 1,831 | 12/12/2023 |
1.0.285 | 133 | 12/12/2023 |
1.0.259 | 1,551 | 10/17/2023 |
1.0.258 | 135 | 10/17/2023 |
1.0.257 | 244 | 10/13/2023 |
1.0.256 | 144 | 10/13/2023 |
1.0.255 | 240 | 10/10/2023 |
1.0.254 | 153 | 10/10/2023 |
1.0.253 | 194 | 9/19/2023 |
1.0.252 | 140 | 9/19/2023 |
1.0.251 | 166 | 9/13/2023 |
1.0.250 | 155 | 9/13/2023 |
1.0.245 | 187 | 7/26/2023 |
1.0.244 | 172 | 7/26/2023 |
1.0.243 | 189 | 7/19/2023 |
1.0.242 | 180 | 7/19/2023 |
1.0.241 | 157 | 7/11/2023 |
1.0.240 | 169 | 7/11/2023 |
1.0.239 | 168 | 7/7/2023 |
1.0.238 | 156 | 7/7/2023 |
1.0.237 | 183 | 7/6/2023 |
1.0.236 | 165 | 7/6/2023 |
1.0.235 | 158 | 7/6/2023 |
1.0.234 | 169 | 7/6/2023 |
1.0.232 | 161 | 7/5/2023 |
1.0.231 | 170 | 7/5/2023 |
1.0.230 | 185 | 7/5/2023 |
1.0.229 | 177 | 7/5/2023 |
1.0.228 | 166 | 7/5/2023 |
1.0.227 | 171 | 7/5/2023 |
1.0.226 | 172 | 7/4/2023 |
1.0.225 | 162 | 7/4/2023 |
1.0.224 | 194 | 7/3/2023 |
1.0.223 | 163 | 7/3/2023 |
1.0.222 | 166 | 6/30/2023 |
1.0.221 | 148 | 6/30/2023 |
1.0.220 | 171 | 6/30/2023 |
1.0.219 | 161 | 6/30/2023 |
1.0.218 | 195 | 6/17/2023 |
1.0.217 | 171 | 6/17/2023 |
1.0.214 | 173 | 6/6/2023 |
1.0.213 | 161 | 6/6/2023 |
1.0.212 | 163 | 6/6/2023 |
1.0.211 | 159 | 6/6/2023 |
1.0.206 | 159 | 6/5/2023 |
1.0.205 | 157 | 6/5/2023 |
1.0.204 | 180 | 6/2/2023 |
1.0.203 | 147 | 6/2/2023 |
1.0.202 | 173 | 6/2/2023 |
1.0.201 | 170 | 6/2/2023 |
1.0.190 | 591 | 5/27/2022 |
1.0.189 | 538 | 5/27/2022 |
1.0.188 | 550 | 5/23/2022 |
1.0.187 | 558 | 5/23/2022 |
1.0.186 | 519 | 5/18/2022 |
1.0.185 | 519 | 5/18/2022 |
1.0.184 | 562 | 5/18/2022 |
1.0.183 | 565 | 5/18/2022 |
1.0.182 | 565 | 5/17/2022 |
1.0.181 | 554 | 5/17/2022 |
1.0.180 | 548 | 5/11/2022 |
1.0.179 | 556 | 5/11/2022 |
1.0.178 | 571 | 5/6/2022 |
1.0.177 | 572 | 5/6/2022 |
1.0.176 | 598 | 4/2/2022 |
1.0.175 | 577 | 4/2/2022 |
1.0.174 | 565 | 3/24/2022 |
1.0.173 | 554 | 3/24/2022 |
1.0.172 | 514 | 3/23/2022 |
1.0.171 | 546 | 3/23/2022 |
1.0.170 | 538 | 3/23/2022 |
1.0.169 | 536 | 3/23/2022 |
1.0.168 | 576 | 3/21/2022 |
1.0.167 | 566 | 3/21/2022 |
1.0.166 | 566 | 3/19/2022 |
1.0.165 | 585 | 3/19/2022 |
1.0.164 | 556 | 3/17/2022 |
1.0.163 | 558 | 3/17/2022 |
1.0.162 | 555 | 3/17/2022 |
1.0.161 | 572 | 3/17/2022 |
1.0.160 | 553 | 3/16/2022 |
1.0.159 | 576 | 3/16/2022 |
1.0.158 | 579 | 3/7/2022 |
1.0.157 | 577 | 3/7/2022 |
1.0.156 | 566 | 3/6/2022 |
1.0.155 | 567 | 3/6/2022 |
1.0.154 | 578 | 3/6/2022 |
1.0.153 | 580 | 3/6/2022 |
1.0.152 | 573 | 3/6/2022 |
1.0.151 | 580 | 3/6/2022 |
1.0.150 | 573 | 3/6/2022 |
1.0.149 | 593 | 3/6/2022 |
1.0.148 | 591 | 3/5/2022 |
1.0.147 | 581 | 3/5/2022 |
1.0.146 | 535 | 3/5/2022 |
1.0.145 | 686 | 3/5/2022 |
1.0.144 | 677 | 3/5/2022 |
1.0.143 | 692 | 3/5/2022 |
1.0.142 | 675 | 3/5/2022 |
1.0.140 | 576 | 3/5/2022 |
1.0.139 | 557 | 3/5/2022 |
1.0.137 | 562 | 3/5/2022 |
1.0.136 | 544 | 3/5/2022 |
1.0.135 | 434 | 3/5/2022 |
1.0.134 | 436 | 3/5/2022 |
1.0.133 | 570 | 3/5/2022 |
1.0.132 | 575 | 3/5/2022 |
1.0.131 | 559 | 3/5/2022 |
1.0.130 | 584 | 3/5/2022 |
1.0.128 | 561 | 3/5/2022 |
1.0.126 | 436 | 3/5/2022 |
1.0.125 | 461 | 3/4/2022 |
1.0.124 | 457 | 3/4/2022 |
1.0.123 | 460 | 3/4/2022 |
1.0.122 | 467 | 3/4/2022 |
1.0.120 | 467 | 3/4/2022 |
1.0.119 | 455 | 3/4/2022 |
1.0.118 | 444 | 3/3/2022 |
1.0.117 | 437 | 3/3/2022 |
1.0.116 | 435 | 3/3/2022 |
1.0.115 | 458 | 3/3/2022 |
1.0.114 | 467 | 2/21/2022 |
1.0.113 | 442 | 2/21/2022 |
1.0.112 | 478 | 2/19/2022 |
1.0.111 | 439 | 2/18/2022 |
1.0.110 | 452 | 2/18/2022 |
1.0.109 | 448 | 2/18/2022 |
1.0.107 | 443 | 2/17/2022 |
1.0.106 | 1,034 | 2/17/2022 |
1.0.105 | 484 | 1/18/2022 |
1.0.104 | 476 | 1/18/2022 |
1.0.103 | 315 | 12/20/2021 |
1.0.102 | 319 | 12/20/2021 |
1.0.101 | 303 | 12/20/2021 |
1.0.100 | 298 | 12/20/2021 |
1.0.99 | 285 | 12/20/2021 |
1.0.98 | 270 | 12/20/2021 |
1.0.96 | 303 | 12/18/2021 |
1.0.94 | 347 | 12/18/2021 |
1.0.93 | 320 | 12/18/2021 |
1.0.92 | 337 | 12/18/2021 |
1.0.0 | 457 | 3/5/2022 |