Magic Cloud

An Open Source Application Generator

Magic Lambda CSV

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


      name:Thomas Hansen
      name:John Doe

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 object, 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 is [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.

Project website

The source code for this repository can be found at, and you can provide feedback, provide bug reports, etc at the same place.

Quality gates


This project is the copyright(c) 2020-2021 of Thomas Hansen, and is licensed under the terms of the LGPL version 3, as published by the Free Software Foundation. See the enclosed LICENSE file for details.