https://github.com/luanroger/serializedconfiguration
⚙️ Create, manage and save settings in .yaml or .json.
https://github.com/luanroger/serializedconfiguration
c-sharp configuration dotnet json nuget serialization settings yaml
Last synced: 2 months ago
JSON representation
⚙️ Create, manage and save settings in .yaml or .json.
- Host: GitHub
- URL: https://github.com/luanroger/serializedconfiguration
- Owner: LuanRoger
- License: mit
- Created: 2021-08-12T19:44:52.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-05-07T11:59:37.000Z (about 4 years ago)
- Last Synced: 2025-01-15T10:55:58.539Z (over 1 year ago)
- Topics: c-sharp, configuration, dotnet, json, nuget, serialization, settings, yaml
- Language: C#
- Homepage: https://www.nuget.org/packages/SerializedConfig
- Size: 46.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SerializedConfiguration
### Create, manage and save settings in .yaml or .json.


## Dependencies
- .NET 5
- [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json) (>= 13.0.1)
- [YamlDotNet](https://www.nuget.org/packages/YamlDotNet) (>= 11.2.1)
## Installation
### PM
```powershell
Install-Package SerializedConfig
```
### .NET CLI
```powershell
dotnet add package SerializedConfig
```
See also in [NuGet Gallery](https://www.nuget.org/packages/SerializedConfig)
## Simple example:
```csharp
[ConfigSection]
public class ConfigurationModel : IConfigurationModel
{
public Person person { get; set; }
public Person anotherPerson { get; set; }
}
```
```csharp
ConfigurationModel configurationModel = new()
{
person = new()
{
name = "Bob",
age = 68
},
anotherPerson = new()
{
name = "Anders",
age = 60
}
};
ConfigManager configManager = new(Consts.SAVE_FILE_PATH_YAML, SerializationFormat.Yaml, configurationModel);
configManager.Save();
```
## Documentation
Access the documentation on [Wiki](https://github.com/LuanRoger/SerializedConfiguration/wiki)