Skip to content

Jsondyno is a C# library that leverages the dynamic keyword to provide intuitive and flexible access to JSON object properties.

License

Notifications You must be signed in to change notification settings

vsavik/jsondyno

Repository files navigation

Jsondyno

Jsondyno is a C# library that allows you to use the dynamic keyword to access JSON object properties without model classes.

Quick start

Install NuGet package and add DynamicObjectJsonConverter to JsonSerializerOptions instance:

using Jsondyno;

var opts = new JsonSerializerOptions
{
    Converters = { new DynamicObjectJsonConverter() }
};

string json = """
    {
        "MyProperty": 11
    }
    """;

dynamic obj = JsonSerializer.Deserialize<dynamic>(json, opts)!;
int myProperty = obj.MyProperty;

Console.WriteLine(myProperty); // Output: 11

Jsondyno uses System.Text.Json library to parse JSON, so dynamic object property name conversion fully satisfy configuration settings:

More usage topic can be found here.

Documentation

Contributing

When contributing to the Jsondyno repo, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note the code of conduct, please follow it in all your interactions with the project.

How to deal with security issues check security page.

License

Jsondyno is licensed under the MIT license.

About

Jsondyno is a C# library that leverages the dynamic keyword to provide intuitive and flexible access to JSON object properties.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages