Skip to content

Commit

Permalink
Read me file changes
Browse files Browse the repository at this point in the history
  • Loading branch information
konak committed Oct 24, 2023
1 parent 2a95d18 commit c4059ce
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
[![.NET](https://github.com/konak/am.kon.packages.common.json/actions/workflows/dotnet.yml/badge.svg?branch=main)](https://github.com/konak/am.kon.packages.common.json/actions/workflows/dotnet.yml)

# am.kon.packages.common.json
# JsonCommonExtensions

A utility class providing common JSON serialization and deserialization extensions.

## Usage

### Serialization
```csharp
var myObject = new { Name = "John", Age = 30 };
string jsonString = myObject.ToJson();

### Deserialization
```csharp
string jsonString = "{\"name\":\"John\",\"age\":30}";
var myObject = jsonString.ToObject<dynamic>();

### Custom Serialization Options
```csharp
var options = new JsonSerializerOptions { WriteIndented = true };
JsonCommonExtensions.Configure(options);
string jsonString = myObject.ToJson(options);

### Configuration
Use the JsonCommonExtensions.Configure method to set custom serialization options.
```csharp
var options = new JsonSerializerOptions { WriteIndented = true };
JsonCommonExtensions.Configure(options);


This README provides a brief description, usage examples, and configuration instructions for your class.

0 comments on commit c4059ce

Please sign in to comment.