magic.lambda.csv 17.2.0

dotnet add package magic.lambda.csv --version 17.2.0
NuGet\Install-Package magic.lambda.csv -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.csv" 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.csv --version 17.2.0
#r "nuget: magic.lambda.csv, 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.csv as a Cake Addin
#addin nuget:?package=magic.lambda.csv&version=17.2.0

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

magic.lambda.csv - Parsing and creating CSV from Hyperlambda

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

  • [lambda2csv] - Creates a CSV string from a lambda object
  • [csv2lambda] - Creates a lambda object from a CSV string

Convert from lambda to CSV and back again

.data
   .
      name:Thomas Hansen
      age:int:47
   .
      name:John Doe
      age:int:67

lambda2csv:x:-/*

add:x:+/*/types
   get-nodes:x:@lambda2csv/*

csv2lambda:x:@lambda2csv
   types

Notice, the [lambda2csv] slot will return type information, and the [csv2lambda] slot can optionally be given type information in its [types] argument, allowing you to convert correctly back to the correct type(s) as you convert a CSV string to its lambda objects. The [lambda2csv] slot will also create headers for your CSV string, and the [csv2lambda] slot will use the first line to retrieve these headers, to rebuild the lambda object correctly.

This allows you to roundtrip from a lambda object, to CSV format, and back to lambda again, without loosing type information or names of your nodes. This is necessary since CSV doesn't preserve types in any ways. By default the [lambda2csv] will also treat null values correctly, by adding these into the CSV file as "[NULL]". This allows you to preserve null values, which isn't really possible with CSV normally - However, for some edge cases you might want to use different null value, at which point you can supply this as [null-value] argument to both slots. If you supply a [null-value] argument, but set its value to null - Null values will be ignored, and no null values will be persisted in any direction.

How to use [csv2lambda]

This slot converts a CSV string into a lambda object. In its simplest form it would resemble the following.

.csv:@"name,age
Thomas Hansen,47
John Doe,67"

csv2lambda:x:@.csv

It can optionally take a type declaration through a [types] argument, which allows you to add typing support to the slot.

How to use [lambda2csv]

This slot converts the specified lambda object to a CSV string. Below is an example of usage.

.data
   .
      name:Thomas Hansen
      age:int:47
   .
      name:John Doe
      age:int:67

lambda2csv:x:-/*

The slot will return type information as children of your [lambda2csv] invocation.

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.csv

The source code for this repository can be found at github.com/polterguy/magic.lambda.csv, 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.csv:

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 259 1/22/2024
17.1.7 146 1/12/2024
17.1.6 122 1/11/2024
17.1.5 143 1/5/2024
17.0.1 171 1/1/2024
17.0.0 312 12/14/2023
16.11.5 283 11/12/2023
16.9.0 286 10/9/2023
16.7.0 479 7/11/2023
16.4.1 355 7/2/2023
16.4.0 359 6/22/2023
16.3.1 310 6/7/2023
16.3.0 295 5/28/2023
16.1.9 570 4/30/2023
15.10.11 450 4/13/2023
15.9.1 571 3/27/2023
15.9.0 408 3/24/2023
15.8.2 459 3/20/2023
15.7.0 343 3/6/2023
15.5.0 1,482 1/28/2023
15.2.0 609 1/18/2023
15.1.0 1,118 12/28/2022
14.5.7 663 12/13/2022
14.5.5 763 12/6/2022
14.5.1 625 11/23/2022
14.5.0 574 11/18/2022
14.4.5 656 10/22/2022
14.4.1 704 10/22/2022
14.4.0 610 10/17/2022
14.3.1 1,210 9/12/2022
14.3.0 606 9/10/2022
14.1.3 867 8/7/2022
14.1.2 602 8/7/2022
14.1.1 614 8/7/2022
14.0.14 651 7/26/2022
14.0.12 624 7/24/2022
14.0.11 603 7/23/2022
14.0.10 597 7/23/2022
14.0.9 625 7/23/2022
14.0.8 684 7/17/2022
14.0.5 753 7/11/2022
14.0.4 719 7/6/2022
14.0.3 686 7/2/2022
14.0.2 633 7/2/2022
14.0.0 801 6/25/2022
13.4.0 1,993 5/31/2022
13.3.4 1,379 5/9/2022
13.3.0 917 5/1/2022
13.2.0 1,129 4/21/2022
13.1.0 998 4/7/2022
13.0.0 699 4/5/2022
11.0.5 1,353 3/2/2022
11.0.4 713 2/22/2022
11.0.3 751 2/9/2022
11.0.2 738 2/6/2022
11.0.1 746 2/5/2022
10.0.21 725 1/28/2022
10.0.20 732 1/27/2022
10.0.19 730 1/23/2022
10.0.18 700 1/17/2022
10.0.15 865 12/31/2021
10.0.14 499 12/28/2021
10.0.7 1,372 12/22/2021
10.0.5 684 12/18/2021
9.9.9 1,644 11/29/2021
9.9.3 867 11/9/2021
9.9.2 579 11/4/2021
9.9.0 700 10/30/2021
9.8.9 662 10/29/2021
9.8.7 603 10/27/2021
9.8.6 595 10/27/2021
9.8.5 674 10/26/2021
9.8.0 1,280 10/20/2021
9.7.9 582 10/19/2021
9.7.5 1,418 10/14/2021
9.7.0 803 10/9/2021
9.6.6 1,155 8/14/2021
9.2.0 6,083 5/26/2021
9.1.4 1,222 4/21/2021
9.1.0 971 4/14/2021
9.0.0 841 4/5/2021
8.9.9 959 3/30/2021