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 | 443 | 1/22/2024 |
17.1.7 | 211 | 1/12/2024 |
17.1.6 | 158 | 1/11/2024 |
17.1.5 | 196 | 1/5/2024 |
17.0.1 | 229 | 1/1/2024 |
17.0.0 | 380 | 12/14/2023 |
16.11.5 | 361 | 11/12/2023 |
16.9.0 | 348 | 10/9/2023 |
16.7.0 | 567 | 7/11/2023 |
16.4.1 | 401 | 7/2/2023 |
16.4.0 | 400 | 6/22/2023 |
16.3.1 | 360 | 6/7/2023 |
16.3.0 | 350 | 5/28/2023 |
16.1.9 | 627 | 4/30/2023 |
15.10.11 | 503 | 4/13/2023 |
15.9.1 | 574 | 3/27/2023 |
15.9.0 | 474 | 3/24/2023 |
15.8.2 | 505 | 3/20/2023 |
15.7.0 | 413 | 3/6/2023 |
15.5.0 | 1,585 | 1/28/2023 |
15.2.0 | 718 | 1/18/2023 |
15.1.0 | 1,155 | 12/28/2022 |
14.5.7 | 702 | 12/13/2022 |
14.5.5 | 817 | 12/6/2022 |
14.5.1 | 702 | 11/23/2022 |
14.5.0 | 618 | 11/18/2022 |
14.4.5 | 729 | 10/22/2022 |
14.4.1 | 750 | 10/22/2022 |
14.4.0 | 678 | 10/17/2022 |
14.3.1 | 1,272 | 9/12/2022 |
14.3.0 | 646 | 9/10/2022 |
14.1.3 | 925 | 8/7/2022 |
14.1.2 | 667 | 8/7/2022 |
14.1.1 | 675 | 8/7/2022 |
14.0.14 | 689 | 7/26/2022 |
14.0.12 | 705 | 7/24/2022 |
14.0.11 | 621 | 7/23/2022 |
14.0.10 | 680 | 7/23/2022 |
14.0.9 | 670 | 7/23/2022 |
14.0.8 | 728 | 7/17/2022 |
14.0.5 | 782 | 7/11/2022 |
14.0.4 | 753 | 7/6/2022 |
14.0.3 | 707 | 7/2/2022 |
14.0.2 | 681 | 7/2/2022 |
14.0.0 | 836 | 6/25/2022 |
13.4.0 | 2,096 | 5/31/2022 |
13.3.4 | 1,475 | 5/9/2022 |
13.3.0 | 946 | 5/1/2022 |
13.2.0 | 1,170 | 4/21/2022 |
13.1.0 | 1,056 | 4/7/2022 |
13.0.0 | 737 | 4/5/2022 |
11.0.5 | 1,423 | 3/2/2022 |
11.0.4 | 771 | 2/22/2022 |
11.0.3 | 786 | 2/9/2022 |
11.0.2 | 804 | 2/6/2022 |
11.0.1 | 787 | 2/5/2022 |
10.0.21 | 750 | 1/28/2022 |
10.0.20 | 788 | 1/27/2022 |
10.0.19 | 779 | 1/23/2022 |
10.0.18 | 744 | 1/17/2022 |
10.0.15 | 954 | 12/31/2021 |
10.0.14 | 581 | 12/28/2021 |
10.0.7 | 1,469 | 12/22/2021 |
10.0.5 | 761 | 12/18/2021 |
9.9.9 | 1,663 | 11/29/2021 |
9.9.3 | 1,243 | 11/9/2021 |
9.9.2 | 608 | 11/4/2021 |
9.9.0 | 761 | 10/30/2021 |
9.8.9 | 688 | 10/29/2021 |
9.8.7 | 619 | 10/27/2021 |
9.8.6 | 658 | 10/27/2021 |
9.8.5 | 738 | 10/26/2021 |
9.8.0 | 1,372 | 10/20/2021 |
9.7.9 | 658 | 10/19/2021 |
9.7.5 | 1,504 | 10/14/2021 |
9.7.0 | 848 | 10/9/2021 |
9.6.6 | 1,205 | 8/14/2021 |
9.2.0 | 6,288 | 5/26/2021 |
9.1.4 | 1,267 | 4/21/2021 |
9.1.0 | 1,053 | 4/14/2021 |
9.0.0 | 930 | 4/5/2021 |
8.9.9 | 1,005 | 3/30/2021 |
8.9.3 | 1,545 | 3/19/2021 |
8.9.2 | 1,014 | 1/29/2021 |
8.9.1 | 1,008 | 1/24/2021 |
8.9.0 | 1,067 | 1/22/2021 |
8.6.9 | 2,990 | 11/8/2020 |
8.6.6 | 1,987 | 11/2/2020 |
8.6.0 | 4,015 | 10/28/2020 |
8.5.0 | 1,917 | 10/23/2020 |
8.4.0 | 5,593 | 10/13/2020 |
8.3.1 | 2,662 | 10/5/2020 |
8.3.0 | 1,272 | 10/3/2020 |
8.2.2 | 2,036 | 9/26/2020 |
8.2.1 | 1,341 | 9/25/2020 |
8.2.0 | 1,384 | 9/25/2020 |
8.1.19 | 2,565 | 9/21/2020 |
8.1.18 | 4,048 | 9/13/2020 |
8.1.17 | 1,309 | 9/13/2020 |
8.1.16 | 640 | 9/13/2020 |
8.1.15 | 1,240 | 9/12/2020 |
8.1.11 | 3,133 | 9/11/2020 |
8.1.10 | 573 | 9/6/2020 |
8.1.9 | 1,964 | 9/3/2020 |
8.1.8 | 1,272 | 9/2/2020 |
8.1.7 | 1,173 | 8/28/2020 |
8.1.4 | 1,185 | 8/25/2020 |
8.1.3 | 1,274 | 8/18/2020 |
8.1.2 | 1,212 | 8/16/2020 |
8.1.1 | 1,279 | 8/15/2020 |
8.1.0 | 587 | 8/15/2020 |
8.0.1 | 2,674 | 8/7/2020 |
8.0.0 | 1,206 | 8/7/2020 |
7.0.1 | 1,347 | 6/28/2020 |
7.0.0 | 1,243 | 6/28/2020 |
5.0.0 | 7,418 | 2/25/2020 |
4.0.7 | 2,034 | 2/23/2020 |
4.0.6 | 4,471 | 2/7/2020 |
4.0.5 | 1,276 | 1/28/2020 |
4.0.4 | 2,061 | 1/27/2020 |
4.0.3 | 1,231 | 1/27/2020 |
4.0.2 | 1,392 | 1/16/2020 |
4.0.1 | 1,381 | 1/11/2020 |
4.0.0 | 1,429 | 1/5/2020 |
3.1.0 | 6,270 | 11/10/2019 |
3.0.0 | 3,865 | 10/23/2019 |
2.0.1 | 8,196 | 10/15/2019 |
2.0.0 | 1,655 | 10/13/2019 |
1.1.8 | 1,352 | 10/11/2019 |
1.1.7 | 1,293 | 10/10/2019 |
1.1.6 | 626 | 10/9/2019 |
1.1.5 | 607 | 10/6/2019 |
1.1.4 | 611 | 10/6/2019 |
1.1.2 | 604 | 10/5/2019 |
1.0.0 | 664 | 9/26/2019 |