am1goo.System.Text.Json.Combiner 1.0.7

dotnet add package am1goo.System.Text.Json.Combiner --version 1.0.7
NuGet\Install-Package am1goo.System.Text.Json.Combiner -Version 1.0.7
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="am1goo.System.Text.Json.Combiner" Version="1.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add am1goo.System.Text.Json.Combiner --version 1.0.7
#r "nuget: am1goo.System.Text.Json.Combiner, 1.0.7"
#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.
// Install am1goo.System.Text.Json.Combiner as a Cake Addin
#addin nuget:?package=am1goo.System.Text.Json.Combiner&version=1.0.7

// Install am1goo.System.Text.Json.Combiner as a Cake Tool
#tool nuget:?package=am1goo.System.Text.Json.Combiner&version=1.0.7

<a href="https://www.nuget.org/packages/am1goo.System.Text.Json.Combiner" rel="nofollow"> <img alt="NuGet Version" src="https://img.shields.io/nuget/v/am1goo.System.Text.Json.Combiner"> </a>

<a href="https://www.nuget.org/packages/am1goo.System.Text.Json.Combiner" rel="nofollow"> <img alt="NuGet Downloads" src="https://img.shields.io/nuget/dt/am1goo.System.Text.Json.Combiner"> </a>

System.Text.Json.Combiner

What is this:

You can deserialize a lot of inlined JSON files in one JSON file from different sources (local or remote files), like that:

Supported schemes:
  • file:// to load file from system
  • http:// and https:// to load files from web servers
How it can be used:

Use JsonCombiner instead of JsonSerializer to deserialize JSON file from file system and inherit each inlined class or struct from IJsonCombine interface

public TestObject LoadFromFile(string relativePath)
{
  string path = Path.Combine(Environment.CurrentDirectory, relativePath);
  return JsonCombiner.Deserialize<TestObject>(path, options);
}

Also you can able to make your own json IJsonLoader variant and register it via JsonCombiner.RegisterLoader method.

private void Main(string[] args)
{
  var myLoader = new MyJsonLoader();
  JsonCombiner.RegisterLoader("myhttp", myLoader);
}
Example:

Root file:

{
  "param1": "param1",
  "param2": 2,
  "param3": 3.3,
  "inner1": "file://inline/inner_object_1.json",
  "inner2": "inline/inner_object_2.json",
  "inner3": "http://any.public.host.xyz/json.file.json"
}

File inline/inner_object_1.json:

{
  "arg1": "arg1",
  "arg2": 44,
  "arg3": 55.55
}

File inline/inner_object_2.json:

{
  "arg1": "arg2",
  "arg2": 66,
  "arg3": 77.77
}
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • 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
1.0.7 77 4/10/2024
1.0.6 72 3/31/2024
1.0.5 89 3/22/2024
1.0.4 90 3/21/2024