DotNetToolbox.ObjectDumper 8.0.1

Suggested Alternatives

DotNetToolbox.ObjectDumper 8.0.2

There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package DotNetToolbox.ObjectDumper --version 8.0.1                
NuGet\Install-Package DotNetToolbox.ObjectDumper -Version 8.0.1                
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="DotNetToolbox.ObjectDumper" Version="8.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetToolbox.ObjectDumper --version 8.0.1                
#r "nuget: DotNetToolbox.ObjectDumper, 8.0.1"                
#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 DotNetToolbox.ObjectDumper as a Cake Addin
#addin nuget:?package=DotNetToolbox.ObjectDumper&version=8.0.1

// Install DotNetToolbox.ObjectDumper as a Cake Tool
#tool nuget:?package=DotNetToolbox.ObjectDumper&version=8.0.1                

DotNet Toolbox Object Dumper

Overview

The DotNet Toolbox Object Dumper is a powerful and flexible library for .NET that allows developers to dump the contents of any .NET object in a human-readable format. It's a great tool for debugging and logging, providing a quick and easy way to visualize complex objects and data structures.

Features

  • Flexible Formatting: Choose from several layout options including JSON, Typed JSON, and Console.
  • Custom Formatters: Define custom formatters for specific types to control how they are represented.
  • Depth Control: Control the depth of nested objects and collections that are included in the output.
  • Full Type Information: Option to include full type names in the output.
  • Culture-Specific Formatting: Control the culture used for formatting values.

Installation

The DotNet Toolbox Object Dumper is available as a NuGet package. To install it, run the following command in the Package Manager Console:

PM> Install-Package DotNetToolbox.ObjectDumper

Usage

The Object Dumper provides extension methods for any object. Here's a simple example of how to use the Object Dumper:

var myObject = new MyClass();

// Dump object with default options
var result = myObject.Dump();

// Dump object with custom options
var result = myObject.Dump(options => {
    options.Layout = Layout.Json;
    options.Indented = true;
    options.ShowFullNames = true;
});

Console.WriteLine(result);

In this example, myObject is the object you want to dump. The Dump method is an extension method that dumps the object using the specified options. If no options are specified, it uses the default options.

You can also dump an object as JSON:

var myObject = new MyClass();

// Dump object as JSON with default options
var result = myObject.DumpAsJson();

// Dump object as JSON with custom options
var result = myObject.DumpAsJson(options => {
    options.Indented = true;
    options.ShowFullNames = true;
});

Console.WriteLine(result);

Documentation

For more detailed information on how to use the DotNet Toolbox Object Dumper, please refer to the official documentation.

Contributing

Contributions are welcome! Please read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to DotNet Toolbox Object Dumper.

License

The DotNet Toolbox Object Dumper is licensed under the MIT license.

Contact

If you have any issues or feature requests, please file an issue. For other questions or discussions, please join our community forum.

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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
8.1.1 76 8/24/2024
8.1.0 86 5/21/2024
8.0.4 111 2/5/2024
8.0.3 118 1/10/2024
8.0.2 117 1/8/2024

v8.0.1:
     - Based on .Net 8.0