magic.lambda.json 17.2.0

dotnet add package magic.lambda.json --version 17.2.0
NuGet\Install-Package magic.lambda.json -Version 17.2.0
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="magic.lambda.json" Version="17.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add magic.lambda.json --version 17.2.0
#r "nuget: magic.lambda.json, 17.2.0"
#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 magic.lambda.json as a Cake Addin
#addin nuget:?package=magic.lambda.json&version=17.2.0

// Install magic.lambda.json as a Cake Tool
#tool nuget:?package=magic.lambda.json&version=17.2.0

magic.lambda.json - Parsing and creating JSON from Hyperlambda

This project provides JSON helper slots for Magic. More specifically, it provides the following slots.

  • [json2lambda] - Creates a lambda object out of a JSON input string.
  • [json2yaml] - Converts a JSON string to its YAML equivalent.
  • [yaml2lambda] - Creates a lambda object out of a YAML input string.
  • [yaml2json] - Creates a JSON string out of a YAML input string.
  • [lambda2json] - Creates JSON out of a lambda object.
  • [lambda2yaml] - Converts a lambda object to its YAML equivalent.

How to use [json2lambda] and [lambda2json]

.json:@"{""property"": ""value""}"
json2lambda:x:-
lambda2json:x:-/*

The [lambda2json] slot can optionally take a [format] argument, with a boolean "true" value, which implies the resulting JSON will be indented and nicely formated, making it more readable.

Notice - Although all JSON can be transformed into lambda, the opposite is not necessarily true. This is because lambda allows for having multiple nodes with the same name for instance, which would result in a JSON object with multiple properties having the same key. Hence, have this in mind as you persist your lambda objects into JSON.

How to use [yaml2lambda] and [lambda2yaml]

The [yaml2lambda] slot converts a YAML input string to a lambda object. Since YAML arguably is just another representation of JSON, these slot have been added to this project. Notice, the same constraints applies for YAML as does for JSON, implying a YAML string can always be converted to a lambda object, but the opposite is not necessary true. Basic usage is as follows.

.yaml:@"
foo: howdy
bar: jo
howdy: !!bool true
children:
- howdy
- some
"
yaml2lambda:x:@.yaml
lambda2yaml:x:-/*

The above will result in the following.

yaml2lambda
   foo:howdy
   bar:jo
   howdy:bool:true
   children
      .:howdy
      .:some
lambda2yaml: /* ... YAML content ... */

Internally the [yaml2lambda] slot first converts the input YAML to JSON, for then to use the [json2lambda] logic, ensuring the exact same result, regardless of whether or not you start out with JSON or YAML.

How to use [yaml2json] and [json2yaml]

The [yaml2json] slot converts the specified YAML input string to a JSON string. Basic usage is as follows.

.yaml:@"foo: howdy
bar: jo
howdy: !!bool true
children:
- howdy
- some
"
yaml2json:x:@.yaml
json2yaml:x:-

The above results in the following.

{
  "foo": "howdy",
  "bar": "jo",
  "howdy": true,
  "children": [
    "howdy", "some"
  ]
}

Notice, the above have been formatted for brevity. The actual JSON result will not be formatted, or having indentation to ensure result is as compact as possible.

Magic's GitHub project page

Magic is 100% Open Source and you can find the primary project GitHub page here.

Project website for magic.lambda.json

The source code for this repository can be found at github.com/polterguy/magic.lambda.json, and you can provide feedback, provide bug reports, etc at the same place.

  • Build status
  • Quality Gate Status
  • Bugs
  • Code Smells
  • Coverage
  • Duplicated Lines (%)
  • Lines of Code
  • Maintainability Rating
  • Reliability Rating
  • Security Rating
  • Technical Debt
  • Vulnerabilities

The projects is copyright Thomas Hansen 2023 - 2024, and professionally maintained by AINIRO.IO.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on magic.lambda.json:

Package Downloads
magic.library

Helper project for Magic to wire up everything easily by simply adding one package, and invoking two simple methods. When using Magic, this is (probably) the only package you should actually add, since this package pulls in everything else you'll need automatically, and wires up everything sanely by default. To use package go to https://polterguy.github.io

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
17.2.0 263 1/22/2024
17.1.7 156 1/12/2024
17.1.6 129 1/11/2024
17.1.5 149 1/5/2024
17.0.1 177 1/1/2024
17.0.0 338 12/14/2023
16.11.5 306 11/12/2023
16.9.0 301 10/9/2023
16.7.0 487 7/11/2023
16.4.1 343 7/2/2023
16.4.0 350 6/22/2023
16.3.1 315 6/7/2023
16.3.0 311 5/28/2023
16.1.9 596 4/30/2023
15.10.11 463 4/13/2023
15.9.1 536 3/27/2023
15.9.0 444 3/24/2023
15.8.2 471 3/20/2023
15.7.0 383 3/6/2023
15.5.0 1,507 1/28/2023
15.2.0 673 1/18/2023
15.1.0 1,117 12/28/2022
14.5.7 661 12/13/2022
14.5.5 771 12/6/2022
14.5.1 660 11/23/2022
14.5.0 582 11/18/2022
14.4.5 681 10/22/2022
14.4.1 727 10/22/2022
14.4.0 642 10/17/2022
14.3.1 1,221 9/12/2022
14.3.0 625 9/10/2022
14.1.3 891 8/7/2022
14.1.2 640 8/7/2022
14.1.1 639 8/7/2022
14.0.14 662 7/26/2022
14.0.12 663 7/24/2022
14.0.11 598 7/23/2022
14.0.10 640 7/23/2022
14.0.9 643 7/23/2022
14.0.8 687 7/17/2022
14.0.5 751 7/11/2022
14.0.4 720 7/6/2022
14.0.3 668 7/2/2022
14.0.2 660 7/2/2022
14.0.0 790 6/25/2022
13.4.0 2,019 5/31/2022
13.3.4 1,419 5/9/2022
13.3.0 915 5/1/2022
13.2.0 1,124 4/21/2022
13.1.0 1,011 4/7/2022
13.0.0 710 4/5/2022
11.0.5 1,369 3/2/2022
11.0.4 745 2/22/2022
11.0.3 751 2/9/2022
11.0.2 782 2/6/2022
11.0.1 754 2/5/2022
10.0.21 719 1/28/2022
10.0.20 753 1/27/2022
10.0.19 750 1/23/2022
10.0.18 721 1/17/2022
10.0.15 909 12/31/2021
10.0.14 549 12/28/2021
10.0.7 1,407 12/22/2021
10.0.5 713 12/18/2021
9.9.9 1,609 11/29/2021
9.9.3 1,166 11/9/2021
9.9.2 577 11/4/2021
9.9.0 729 10/30/2021
9.8.9 668 10/29/2021
9.8.7 601 10/27/2021
9.8.6 592 10/27/2021
9.8.5 706 10/26/2021
9.8.0 1,320 10/20/2021
9.7.9 617 10/19/2021
9.7.5 1,461 10/14/2021
9.7.0 822 10/9/2021
9.6.6 1,153 8/14/2021
9.2.0 6,151 5/26/2021
9.1.4 1,240 4/21/2021
9.1.0 1,022 4/14/2021
9.0.0 888 4/5/2021
8.9.9 979 3/30/2021
8.9.3 1,513 3/19/2021
8.9.2 979 1/29/2021
8.9.1 980 1/24/2021
8.9.0 1,046 1/22/2021
8.6.9 2,940 11/8/2020
8.6.6 1,951 11/2/2020
8.6.0 3,962 10/28/2020
8.5.0 1,872 10/23/2020
8.4.0 5,530 10/13/2020
8.3.1 2,612 10/5/2020
8.3.0 1,252 10/3/2020
8.2.2 1,986 9/26/2020
8.2.1 1,309 9/25/2020
8.2.0 1,345 9/25/2020
8.1.19 2,536 9/21/2020
8.1.18 3,990 9/13/2020
8.1.17 1,269 9/13/2020
8.1.16 605 9/13/2020
8.1.15 1,206 9/12/2020
8.1.11 3,079 9/11/2020
8.1.10 537 9/6/2020
8.1.9 1,917 9/3/2020
8.1.8 1,257 9/2/2020
8.1.7 1,152 8/28/2020
8.1.4 1,151 8/25/2020
8.1.3 1,239 8/18/2020
8.1.2 1,171 8/16/2020
8.1.1 1,242 8/15/2020
8.1.0 562 8/15/2020
8.0.1 2,621 8/7/2020
8.0.0 1,185 8/7/2020
7.0.1 1,314 6/28/2020
7.0.0 1,195 6/28/2020
5.0.0 7,329 2/25/2020
4.0.7 1,985 2/23/2020
4.0.6 4,406 2/7/2020
4.0.5 1,257 1/28/2020
4.0.4 2,041 1/27/2020
4.0.3 1,211 1/27/2020
4.0.2 1,356 1/16/2020
4.0.1 1,348 1/11/2020
4.0.0 1,380 1/5/2020
3.1.0 6,201 11/10/2019
3.0.0 3,794 10/23/2019
2.0.1 8,079 10/15/2019
2.0.0 1,613 10/13/2019
1.1.8 1,300 10/11/2019
1.1.7 1,256 10/10/2019
1.1.6 591 10/9/2019
1.1.5 575 10/6/2019
1.1.4 585 10/6/2019
1.1.2 571 10/5/2019
1.0.0 632 9/26/2019