Hatchet 0.18.0

dotnet add package Hatchet --version 0.18.0
                    
NuGet\Install-Package Hatchet -Version 0.18.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="Hatchet" Version="0.18.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hatchet" Version="0.18.0" />
                    
Directory.Packages.props
<PackageReference Include="Hatchet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hatchet --version 0.18.0
                    
#r "nuget: Hatchet, 0.18.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.
#:package Hatchet@0.18.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hatchet&version=0.18.0
                    
Install as a Cake Addin
#tool nuget:?package=Hatchet&version=0.18.0
                    
Install as a Cake Tool

Hatchet

It's another text file format.

Hatchet is a text-based data format with features borrowed or ignored from JSON, YAML and XML. The format is intended more as a method of storing configuration and textual assets as opposed to data interchange.

{
  /* 2014-10-15 Current definition of hatchet */
  name "Hatchet"
  isAwesome true
  cost 0
  durability 9001 // todo: nerf durability
  description ![
     For when XML isn't cool enough, JSON isnt smart enough, you've given up
     trying to explain why YAML doesn't like tabs, and you find the lack of
     features disturbing. This is a text block by the way.
     ]!
  versions [0.1 0.2 0.3 0.4]
  tagcloud ['json' xml "data-storage"]
  scandinavian_country_codes [ DK NO SE FO FI IS ]
  dependencies [
    { name "nunit" version "2" }
    { name "fluentassertions" version "" } // todo: find actual version number
  ]
}

Features

  • Block and in-line comments.
  • Text blocks ![Like this]!
  • Object definitions with key-value pairs.
  • Lists [1.0 2.0 3.0 -4.0]
  • Prevention of tooth decay by removing syntactic sugar.
  • Implicit string parsing [this will be parsed as a list of strings]

Requirements

  • .NET Standard 2.0

Installation

via the sauce:

  1. Obtain the source.
  2. Copy the Hatchet.csproj into your solution.

or via nuget:

PM> Install-Package Hatchet

Usage

(For examples see Hatchet.Tests.csproj)

  public void UsingTheConverter()
  {
    var input = "{ exampleString 'This is an example' exampleInt 1234 }";
    var result = HatchetConvert.Deserialize<Test>(input);
    Console.WriteLine($"string = {0}", result.ExampleString);
    Console.WriteLine($"int    = {0}", result.ExampleInt);
  }
  
  public class Test
  {
    public string ExampleString { get; set; }
    public int ExampleInt { get; set; }
  }
  public void UsingTheParser()
  {
     var input = "{ welcomeMessage 'Hello, welcome to Hatchet!' }";
     var parser = new Hatchet.Parser();
     result = (Dictionary<string, object>)parser.Parse(input);
     Console.WriteLine(result["welcomeMessage"]);
  }

License

MIT

Feature Roadmap

  • Improved exception handling of malformed Hatchet (.axe) input.
  • Stream support.
  • Custom object serialization handlers.
  • Deserialization of objects without parameterless constructors.
  • Support .net core.
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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.18.0 212 9/10/2025
0.17.0 1,373 9/20/2019
0.16.1 1,386 5/19/2019
0.16.0 1,421 5/19/2019
0.15.1 1,567 12/31/2018
0.14.1 2,098 5/20/2018
0.14.0 2,138 1/12/2018
0.13.4 2,217 1/1/2018
0.13.0 2,422 12/24/2017
0.12.2 2,187 8/16/2017
0.10.2 2,422 8/12/2017
0.10.1 2,125 8/12/2017
0.9.1 2,347 2/27/2017
0.8.1 2,303 2/21/2017
0.8.0 2,168 2/14/2017
0.7.0 2,424 2/6/2017
0.6.1 2,220 1/26/2017
0.6.0 2,239 1/14/2017
0.5.0 2,280 12/28/2016
0.4.0 2,214 11/27/2016
Loading failed