FluentDataBuilder 8.0.123

There is a newer version of this package available.
See the version list below for details.
dotnet add package FluentDataBuilder --version 8.0.123
                    
NuGet\Install-Package FluentDataBuilder -Version 8.0.123
                    
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="FluentDataBuilder" Version="8.0.123" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluentDataBuilder" Version="8.0.123" />
                    
Directory.Packages.props
<PackageReference Include="FluentDataBuilder" />
                    
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 FluentDataBuilder --version 8.0.123
                    
#r "nuget: FluentDataBuilder, 8.0.123"
                    
#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 FluentDataBuilder@8.0.123
                    
#: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=FluentDataBuilder&version=8.0.123
                    
Install as a Cake Addin
#tool nuget:?package=FluentDataBuilder&version=8.0.123
                    
Install as a Cake Tool

FluentDataBuilder

fluent-data-builder

License Downloads

.NET Version

Lines of Code Vulnerabilities Coverage

buy me a coffe

A fluent data builder for json and xml

DataBuilder Output Libraries

FluentDataBuilder has some NuGet-Libraries to generate output:

Package Target NuGet
FluentDataBuilder.Json System.Text.Json NuGet
FluentDataBuilder.NewtonsoftJson Newtonsoft.Json NuGet
FluentDataBuilder.Microsoft.Extensions.Configuration Microsoft.Extensions.Configuration NuGet
FluentDataBuilder.Xml System.Xml NuGet
FluentDataBuilder.Yaml YamlDotNet NuGet

Examples

FluentDataBuilder.Json (System.Text.Json)

install the nuget FluentDataBuilder.Json and follow the general DataBuilder steps. the following code is a sample for the initialization with System.Text.Json.

IDataBuilder builder = new DataBuilder();
...
JsonDocument jsonResult = builder.Build();

FluentDataBuilder.NewtonsoftJson (Newtonsoft.Json)

install the nuget FluentDataBuilder.NewtonsoftJson and follow the general DataBuilder steps. the following code is a sample for the initialization with Newtonsoft.Json.

IDataBuilder builder = new DataBuilder();
...
JObject jsonResult = builder.Build();

FluentDataBuilder.Microsoft.Extensions.Configuration (Microsoft.Extensions.Configuration)

With this package you can store the DataBuilder instance directly as an IConfiguration instance.

install the nuget FluentDataBuilder.Microsoft.Extensions.Configuration and follow the general DataBuilder steps. the following code is a sample for the initialization with Newtonsoft.Json.

IDataBuilder builder = new DataBuilder();
...
IConfiguration configuration = builder.ToConfiguration();

FluentDataBuilder.Xml (System.Xml)

install the nuget FluentDataBuilder.Xml and follow the general DataBuilder steps. the following code is a sample for the initialization with System.Xml.

IDataBuilder builder = new DataBuilder();
...
XmlDocument xmlDocument = builder.Build();

FluentDataBuilder.Yaml (YamlDotNet)

install the nuget FluentDataBuilder.Yaml and follow the general DataBuilder steps..

IDataBuilder builder = new DataBuilder();
...
string yamlContent = builder.Build();

How to create Data Objects

First you need to create an instance:

IDataBuilder builder = new DataBuilder();

Use the Add-Method to add data:

add simple properties

builder.Add("StringProperty", "a value");
builder.Add("NumericProperty", 12345);
builder.Add("BooleanProperty", true);

result (in json):

{
    "StringProperty": "a value",
    "NumericProperty": 12345,
    "BooleanProperty": true
}

add arrays

builder.Add("ListProperty", new List<string> { "this", "is", "a", "test" });
builder.Add("ArrayProperty", new string[] { "this", "is", "a", "test" });
builder.Add("MixedListProperty", new List<object> { "value", 123, true, 456.78 });

result (in json):

{
    "ListProperty":
    [
        "this",
        "is",
        "a",
        "test"
    ],
    "ArrayProperty":
    [
        "this",
        "is",
        "a",
        "test"
    ],
    "MixedListProperty":
    [
        "value",
        123,
        true,
        456.78
    ]
}

add new object

builder.Add("ObjectProperty", new DataBuilder()
    .Add("StringProperty", "another value")
    .Add("NumericProperty", 67890)
    .Add("BooleanProperty", false));

result (in json):

{
    "ObjectProperty":
    {
        "StringProperty": "another value",
        "NumericProperty": 67890,
        "BooleanProperty": false
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on FluentDataBuilder:

Package Downloads
FluentDataBuilder.Json

fluent data builder for json (System.Text.Json)

FluentDataBuilder.Microsoft.Extensions.Configuration

fluent data builder for json and xml

FluentDataBuilder.Xml

fluent data builder for xml

FluentDataBuilder.NewtonsoftJson

fluent data builder for json (Newtonsoft.Json)

FluentDataBuilder.Yaml

fluent data builder for yaml

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.130 356 11/6/2025
8.0.129 263 11/5/2025
8.0.128 251 11/5/2025
8.0.127 256 11/5/2025
8.0.126 253 11/5/2025
8.0.125 258 11/5/2025
8.0.124 289 11/4/2025
8.0.123 250 11/4/2025
8.0.114 747 6/11/2025
8.0.113 237 4/18/2025
8.0.112 238 1/30/2025
8.0.108 241 10/16/2024
1.2.107 361 7/24/2024
1.2.106 247 7/24/2024
1.2.105 635 4/28/2024
1.2.104 711 12/24/2023
1.2.103 340 12/23/2023
1.2.102 157 12/23/2023
1.2.101 195 12/23/2023
1.2.84 201 12/6/2023
1.2.83 13,244 12/6/2023
1.2.82 313 12/6/2023
1.2.77 170 11/18/2023
1.2.75 156 11/17/2023
1.2.74 609 11/17/2023
1.2.73 276 11/17/2023
1.1.69 317 9/28/2023
1.1.68 377 9/28/2023
1.1.67 264 9/28/2023
1.1.66 291 9/27/2023
1.1.65 299 9/27/2023
1.1.64 260 9/27/2023
1.1.53 159 9/17/2023
1.1.52 448 9/17/2023
1.1.51 275 9/17/2023
1.1.50 149 9/17/2023
1.1.49 361 9/17/2023
1.1.46 285 9/17/2023
1.1.45 242 9/17/2023
1.1.44 262 9/17/2023
1.1.36 282 9/6/2023
1.1.35 324 9/6/2023
1.1.34 305 9/6/2023
1.1.33 290 9/5/2023
1.1.32 195 9/5/2023
1.1.31 435 9/5/2023
1.1.20 577 8/11/2023
1.1.15 325 8/3/2023
1.1.13 322 8/2/2023
1.1.10 206 8/2/2023
1.1.0 325 8/2/2023
1.0.0 206 8/1/2023