SerializationHelper 1.0.2

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

// Install SerializationHelper as a Cake Tool
#tool nuget:?package=SerializationHelper&version=1.0.2

<img src="https://github.com/jchristn/SerializationHelper/blob/main/Assets/logo.png?raw=true" data-canonical-src="https://github.com/jchristn/SerializationHelper/blob/main/Assets/logo.png?raw=true" width="128" height="128" />

SerializationHelper

SerializationHelper is a simple wrapper around System.Text.Json to overcome some of the common challenges developers face when using Microsoft's JSON library.

NuGet Version NuGet

Help, Feedback, Contribute

If you have any issues or feedback, please file an issue here in Github. We'd love to have you help by contributing code for new features, optimization to the existing codebase, ideas for future releases, or fixes!

Overview

This project was built to provide a simple interface over System.Text.Json. Let's face it. Migrating from the wonderful Newtonsoft.Json package wasn't as easy as anyone expected. Microsoft's implementation is strong but has strong opinions and doesn't, as of the creation of this library, provide the same level of out-of-the-box experience as the Newtonsoft implementation.

This library is my attempt at trying to make the Microsoft implementation behave in a manner consistent to what I experienced while using the Newtonsoft implementation.

New in v1.0.x

  • Initial release

Example Project

Refer to the Test project for exercising the library.

using SerializationHelper;

public class Person
{
  public int Id { get; set; }
  public string FirstName { get; set; }
  public string LastName { get; set; }
}

Person p1 = new Person { Id = 10, FirstName = "Joe", LastName = "Smith" };
Console.WriteLine(Serializer.SerializeJson(p1, false)); // false = not pretty print
// {"Id":10,"FirstName":"Joe","LastName":"Smith"}

Person p2 = Serializer.DeserializeJson<Person>("{\"Id\":10,\"FirstName\":\"Joe\",\"LastName\":\"Smith\"}");
Console.WriteLine(p2.Id + ": " + p2.FirstName + " " + p2.LastName);
// 10: Joe Smith

Version History

Refer to CHANGELOG.md for version history.

Product 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 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. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SerializationHelper:

Package Downloads
PaigoDotNet

Simple C# library for using Paigo.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 132 1/17/2024
1.0.1 183 11/2/2023
1.0.0 124 10/30/2023

Initial release