ToolBX.FileGuy.Newtonsoft 2.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ToolBX.FileGuy.Newtonsoft --version 2.0.1
NuGet\Install-Package ToolBX.FileGuy.Newtonsoft -Version 2.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="ToolBX.FileGuy.Newtonsoft" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ToolBX.FileGuy.Newtonsoft --version 2.0.1
#r "nuget: ToolBX.FileGuy.Newtonsoft, 2.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 ToolBX.FileGuy.Newtonsoft as a Cake Addin
#addin nuget:?package=ToolBX.FileGuy.Newtonsoft&version=2.0.1

// Install ToolBX.FileGuy.Newtonsoft as a Cake Tool
#tool nuget:?package=ToolBX.FileGuy.Newtonsoft&version=2.0.1

FileGuy

FileGuy

High-level API for saving and loading files.

Setup

With [AutoInject]

Congratulations! You have no additional setup to perform beyond AutoInject's initial setup and can use FileGuy right outside the box after installing the package.

Without [AutoInject]

Use the following extension method in your initialization code :

services.AddFileGuy();

Getting started

Compression

FileGuy doesn't use compression by default but does provides you with the option to compress and decompress your file using gzip's algorithm.

Just look for the CompressionLevel property in FileSaveOptions (or FileSerializerOptions if you're using one of the FileSerializers.)

var options = new FileSaveOptions { CompressionLevel = CompressionLevel.Optimal };

Default options

Using appsettings.json to setup default file saving behavior for your entire project so you don't have to pass options all the time.

FileGuy.Json

Adds a FileSerializer service which takes advantage of FileGuy's features to serialize objects to file using Microsoft's System.Text json library.

FileGuy.Newtonsoft

Similar to FileGuy.Json except that it uses Newtonsoft's json libraries (Json.Net) to achieve serialization.

Why choose FileGuy.Newtonsoft over FileGuy.Json?

At this point in time, Newtonsoft's json serialization is already part of many already-existing project. It is still going strong as the number one json library for .NET despite Microsoft's attempts to overshadow it with System.Text.

I'm not taking sides here as I believe both are very solid tools. I'm not going to tell you to choose System.Text over Newtonsoft for new projects either since Newtonsoft should still be considered.

What I'm saying is : Find out for yourself which one works best for you and go with it.

As of 2022, Newtonsoft still has a lot more features but System.Text has more performance. In other words; I don't think either one completely trumps the other and/or renders it obsolete.

If you still don't know which one to go for then- I don't know- just flip a coin?

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2.2.0 104 1/13/2024
2.2.0-beta2 61 1/11/2024
2.2.0-beta1 107 1/7/2024
2.0.2 191 6/19/2023
2.0.1 211 4/27/2023
2.0.0 333 11/12/2022
2.0.0-beta1 139 10/7/2022
1.0.1 358 10/7/2022
1.0.0 383 5/16/2022