I just published a new version of my open source C# Dandraka.Slurper library in Github and Nuget.org.
The new version, 2.0, implements the existing XML functionality but, additionally, for Json. And because it’s not just about XML anymore, I had to rename it from Dandraka.XmlUtilities (which, if I’m being honest, sounded bad anyway) to Dandraka.Slurper. It also targets .Net Standard 2.1.
Here’s a quick usage example:
public void PrintJsonContents1_Simple()
string json =
'author': 'Gambardella, Matthew',
'title': 'XML Developer Guide'
var book = JsonSlurper.ParseText(json);
// that's it, now we have everything
Console.WriteLine("id = " + book.id);
Console.WriteLine("isbn = " + book.isbn);
Console.WriteLine("author = " + book.author);
Console.WriteLine("title = " + book.title);
Separately, there are a couple of changes that don’t impact the users of the library:
I just published a new version of my open source C# Zoro library in Github and Nuget.org.
Zoro is a data masking/anonymization utility. It fetches data from a database or a CSV file, masks (i.e. anonymizes) them according to the configuration provided and uses the masked data to create a CSV file or run SQL statements such as INSERTs or UPDATEs.
The new version, 2.0, has been converted to DotNet Standard 2.1 to take advantage of some useful DotNet features. The command line utility and the test project are written with DotNet Core 5.0.
The issue from 1.0.2, where the Nuget package did not contain the executables, has been corrected. The package now contains both a Win64 and a Linux64 executable. Since they are self-contained programs, no prior installation of DotNet is needed.
But the most important new feature is a new MaskType, “Query”. With this, the library can retrieve values from a database and pick a random one. In previous versions this was only possible with lists that were fixed in the XML (MaskType=List).
For example, let’s say you are masking the following data:
In the database you might also have a table with cities and countries:
In order to anonymize the above data, your config could look like this:
I just published a new version of my open source C# Zoro(*) library in Github and Nuget.org.
Zoro is a data masking/anonymization utility. It fetches data from a database or a CSV file, and creates a CSV file with masked data.
The new version, 1.0.2, has been converted to DotNet Standard 2.0. The command line utility and the test project have been converted to Dotnet Core 5.0.
There is a known issue, not with the code but with the Nuget package. The description claims, as was intended, that the package contains not only the library but also the exe, which can be used as a standalone command line utility. But due to some wrong path in the Github Action, it doesn’t.
I’ll try to get that fixed in the next weeks. Until then, if you need the exe, please checkout the code and build with Visual Studio or Visual Studio Code.
(*) YES NOW I KNOW THIS IS MISSPELLED AND THE CORRECT SPELLING IS ZORRO, I DIDN’T WHEN I STARTED THE LIBRARY, SORRY!
I just published a new version of my open source C# XmlSlurper library in Github and Nuget.org.
The new version, 1.3.0, contains two major bug fixes:
In previous versions, when the xml contained CDATA nodes, an error was thrown (“Type System.Xml.XmlCDataSection is not supported”). This has been fixed, so now the following works:
<Title><![CDATA[DOCUMENTO N. 1234-9876]]></Title>
This xml can be used as follows:
var cdata = XmlSlurper.ParseText(getFile("CData.xml"));
// produces 'DOCUMENTO N. 1234-9876'
In previous versions, when the xml contained xml comments, an error was thrown (“Type System.Xml.XmlComment is not supported”). This has been fixed; the xml comments are now ignored.
Separately, there are a few more changes that don’t impact the users of the library:
A Github action was added that, when the package version changes, automatically builds and tests the project, creates a Nuget package and publishes it to Nuget.org. That will save me quite some time come next version 🙂
The test project was migrated from DotNet Core 2.2 to 3.1.
The tests were migrated from MSTest to xUnit, to make the project able to be developed both in Windows and in Linux -my personal laptop runs Ubuntu.
The new version is backwards compatible with all previous versions. So if you use it, updating your projects is effortless and strongly recommended.