FluentDataBuilder 1.1.67
See the version list below for details.
dotnet add package FluentDataBuilder --version 1.1.67
NuGet\Install-Package FluentDataBuilder -Version 1.1.67
<PackageReference Include="FluentDataBuilder" Version="1.1.67" />
paket add FluentDataBuilder --version 1.1.67
#r "nuget: FluentDataBuilder, 1.1.67"
// Install FluentDataBuilder as a Cake Addin #addin nuget:?package=FluentDataBuilder&version=1.1.67 // Install FluentDataBuilder as a Cake Tool #tool nuget:?package=FluentDataBuilder&version=1.1.67
FluentDataBuilder
A fluent data builder for json and xml
DataBuilder Output Libraries
FluentDataBuilder has some NuGet-Libraries to generate output:
Examples
System.Text.Json - FluentDataBuilder.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();
Newtonsoft.Json - FluentDataBuilder.NewtonsoftJson
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();
Microsoft.Extensions.Configuration - FluentDataBuilder.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();
System.Xml - FluentDataBuilder.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();
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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 is compatible. 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. |
-
net6.0
- No dependencies.
-
net7.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.Xml
fluent data builder for xml |
|
FluentDataBuilder.Microsoft.Extensions.Configuration
fluent data builder for json and 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.108 | 118 | 10/16/2024 |
1.2.107 | 239 | 7/24/2024 |
1.2.106 | 124 | 7/24/2024 |
1.2.105 | 518 | 4/28/2024 |
1.2.104 | 586 | 12/24/2023 |
1.2.103 | 226 | 12/23/2023 |
1.2.102 | 98 | 12/23/2023 |
1.2.101 | 127 | 12/23/2023 |
1.2.84 | 149 | 12/6/2023 |
1.2.83 | 295 | 12/6/2023 |
1.2.82 | 222 | 12/6/2023 |
1.2.77 | 129 | 11/18/2023 |
1.2.75 | 114 | 11/17/2023 |
1.2.74 | 424 | 11/17/2023 |
1.2.73 | 201 | 11/17/2023 |
1.1.69 | 227 | 9/28/2023 |
1.1.68 | 273 | 9/28/2023 |
1.1.67 | 184 | 9/28/2023 |
1.1.66 | 196 | 9/27/2023 |
1.1.65 | 192 | 9/27/2023 |
1.1.64 | 186 | 9/27/2023 |
1.1.53 | 104 | 9/17/2023 |
1.1.52 | 322 | 9/17/2023 |
1.1.51 | 182 | 9/17/2023 |
1.1.50 | 100 | 9/17/2023 |
1.1.49 | 220 | 9/17/2023 |
1.1.46 | 192 | 9/17/2023 |
1.1.45 | 164 | 9/17/2023 |
1.1.44 | 178 | 9/17/2023 |
1.1.36 | 196 | 9/6/2023 |
1.1.35 | 203 | 9/6/2023 |
1.1.34 | 209 | 9/6/2023 |
1.1.33 | 181 | 9/5/2023 |
1.1.32 | 134 | 9/5/2023 |
1.1.31 | 278 | 9/5/2023 |
1.1.20 | 389 | 8/11/2023 |
1.1.15 | 217 | 8/3/2023 |
1.1.13 | 230 | 8/2/2023 |
1.1.10 | 139 | 8/2/2023 |
1.1.0 | 227 | 8/2/2023 |
1.0.0 | 138 | 8/1/2023 |