magic.lambda.json
16.3.1
See the version list below for details.
dotnet add package magic.lambda.json --version 16.3.1
NuGet\Install-Package magic.lambda.json -Version 16.3.1
<PackageReference Include="magic.lambda.json" Version="16.3.1" />
paket add magic.lambda.json --version 16.3.1
#r "nuget: magic.lambda.json, 16.3.1"
// Install magic.lambda.json as a Cake Addin #addin nuget:?package=magic.lambda.json&version=16.3.1 // Install magic.lambda.json as a Cake Tool #tool nuget:?package=magic.lambda.json&version=16.3.1
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.
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.
Copyright and maintenance
The projects is copyright of Aista, Ltd 2021 - 2023, and professionally maintained by AINIRO your friendly ChatGPT website chatbot vendor.
Product | Versions 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. |
-
.NETStandard 2.0
- magic.node.extensions (>= 16.3.1)
- magic.signals.contracts (>= 16.3.1)
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.1)
- YamlDotNet (>= 12.1.0)
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 | 432 | 1/22/2024 |
17.1.7 | 203 | 1/12/2024 |
17.1.6 | 152 | 1/11/2024 |
17.1.5 | 190 | 1/5/2024 |
17.0.1 | 217 | 1/1/2024 |
17.0.0 | 374 | 12/14/2023 |
16.11.5 | 355 | 11/12/2023 |
16.9.0 | 342 | 10/9/2023 |
16.7.0 | 561 | 7/11/2023 |
16.4.1 | 393 | 7/2/2023 |
16.4.0 | 395 | 6/22/2023 |
16.3.1 | 355 | 6/7/2023 |
16.3.0 | 345 | 5/28/2023 |
16.1.9 | 622 | 4/30/2023 |
15.10.11 | 498 | 4/13/2023 |
15.9.1 | 569 | 3/27/2023 |
15.9.0 | 469 | 3/24/2023 |
15.8.2 | 500 | 3/20/2023 |
15.7.0 | 408 | 3/6/2023 |
15.5.0 | 1,580 | 1/28/2023 |
15.2.0 | 711 | 1/18/2023 |
15.1.0 | 1,150 | 12/28/2022 |
14.5.7 | 697 | 12/13/2022 |
14.5.5 | 812 | 12/6/2022 |
14.5.1 | 697 | 11/23/2022 |
14.5.0 | 613 | 11/18/2022 |
14.4.5 | 724 | 10/22/2022 |
14.4.1 | 745 | 10/22/2022 |
14.4.0 | 673 | 10/17/2022 |
14.3.1 | 1,267 | 9/12/2022 |
14.3.0 | 641 | 9/10/2022 |
14.1.3 | 920 | 8/7/2022 |
14.1.2 | 662 | 8/7/2022 |
14.1.1 | 670 | 8/7/2022 |
14.0.14 | 684 | 7/26/2022 |
14.0.12 | 700 | 7/24/2022 |
14.0.11 | 616 | 7/23/2022 |
14.0.10 | 675 | 7/23/2022 |
14.0.9 | 665 | 7/23/2022 |
14.0.8 | 723 | 7/17/2022 |
14.0.5 | 777 | 7/11/2022 |
14.0.4 | 746 | 7/6/2022 |
14.0.3 | 702 | 7/2/2022 |
14.0.2 | 676 | 7/2/2022 |
14.0.0 | 831 | 6/25/2022 |
13.4.0 | 2,091 | 5/31/2022 |
13.3.4 | 1,470 | 5/9/2022 |
13.3.0 | 941 | 5/1/2022 |
13.2.0 | 1,165 | 4/21/2022 |
13.1.0 | 1,051 | 4/7/2022 |
13.0.0 | 732 | 4/5/2022 |
11.0.5 | 1,418 | 3/2/2022 |
11.0.4 | 766 | 2/22/2022 |
11.0.3 | 779 | 2/9/2022 |
11.0.2 | 799 | 2/6/2022 |
11.0.1 | 780 | 2/5/2022 |
10.0.21 | 745 | 1/28/2022 |
10.0.20 | 783 | 1/27/2022 |
10.0.19 | 774 | 1/23/2022 |
10.0.18 | 739 | 1/17/2022 |
10.0.15 | 949 | 12/31/2021 |
10.0.14 | 576 | 12/28/2021 |
10.0.7 | 1,464 | 12/22/2021 |
10.0.5 | 750 | 12/18/2021 |
9.9.9 | 1,658 | 11/29/2021 |
9.9.3 | 1,238 | 11/9/2021 |
9.9.2 | 603 | 11/4/2021 |
9.9.0 | 756 | 10/30/2021 |
9.8.9 | 683 | 10/29/2021 |
9.8.7 | 614 | 10/27/2021 |
9.8.6 | 653 | 10/27/2021 |
9.8.5 | 731 | 10/26/2021 |
9.8.0 | 1,367 | 10/20/2021 |
9.7.9 | 653 | 10/19/2021 |
9.7.5 | 1,499 | 10/14/2021 |
9.7.0 | 843 | 10/9/2021 |
9.6.6 | 1,200 | 8/14/2021 |
9.2.0 | 6,283 | 5/26/2021 |
9.1.4 | 1,262 | 4/21/2021 |
9.1.0 | 1,048 | 4/14/2021 |
9.0.0 | 925 | 4/5/2021 |
8.9.9 | 1,000 | 3/30/2021 |
8.9.3 | 1,540 | 3/19/2021 |
8.9.2 | 1,009 | 1/29/2021 |
8.9.1 | 1,003 | 1/24/2021 |
8.9.0 | 1,062 | 1/22/2021 |
8.6.9 | 2,985 | 11/8/2020 |
8.6.6 | 1,982 | 11/2/2020 |
8.6.0 | 4,010 | 10/28/2020 |
8.5.0 | 1,912 | 10/23/2020 |
8.4.0 | 5,588 | 10/13/2020 |
8.3.1 | 2,657 | 10/5/2020 |
8.3.0 | 1,267 | 10/3/2020 |
8.2.2 | 2,031 | 9/26/2020 |
8.2.1 | 1,336 | 9/25/2020 |
8.2.0 | 1,379 | 9/25/2020 |
8.1.19 | 2,558 | 9/21/2020 |
8.1.18 | 4,043 | 9/13/2020 |
8.1.17 | 1,304 | 9/13/2020 |
8.1.16 | 635 | 9/13/2020 |
8.1.15 | 1,233 | 9/12/2020 |
8.1.11 | 3,128 | 9/11/2020 |
8.1.10 | 568 | 9/6/2020 |
8.1.9 | 1,956 | 9/3/2020 |
8.1.8 | 1,267 | 9/2/2020 |
8.1.7 | 1,168 | 8/28/2020 |
8.1.4 | 1,180 | 8/25/2020 |
8.1.3 | 1,269 | 8/18/2020 |
8.1.2 | 1,207 | 8/16/2020 |
8.1.1 | 1,274 | 8/15/2020 |
8.1.0 | 582 | 8/15/2020 |
8.0.1 | 2,669 | 8/7/2020 |
8.0.0 | 1,201 | 8/7/2020 |
7.0.1 | 1,342 | 6/28/2020 |
7.0.0 | 1,238 | 6/28/2020 |
5.0.0 | 7,413 | 2/25/2020 |
4.0.7 | 2,029 | 2/23/2020 |
4.0.6 | 4,466 | 2/7/2020 |
4.0.5 | 1,271 | 1/28/2020 |
4.0.4 | 2,056 | 1/27/2020 |
4.0.3 | 1,226 | 1/27/2020 |
4.0.2 | 1,387 | 1/16/2020 |
4.0.1 | 1,375 | 1/11/2020 |
4.0.0 | 1,424 | 1/5/2020 |
3.1.0 | 6,265 | 11/10/2019 |
3.0.0 | 3,860 | 10/23/2019 |
2.0.1 | 8,191 | 10/15/2019 |
2.0.0 | 1,650 | 10/13/2019 |
1.1.8 | 1,347 | 10/11/2019 |
1.1.7 | 1,288 | 10/10/2019 |
1.1.6 | 621 | 10/9/2019 |
1.1.5 | 602 | 10/6/2019 |
1.1.4 | 606 | 10/6/2019 |
1.1.2 | 599 | 10/5/2019 |
1.0.0 | 659 | 9/26/2019 |