LumConfig 1.0.3
dotnet add package LumConfig --version 1.0.3
NuGet\Install-Package LumConfig -Version 1.0.3
<PackageReference Include="LumConfig" Version="1.0.3" />
<PackageVersion Include="LumConfig" Version="1.0.3" />
<PackageReference Include="LumConfig" />
paket add LumConfig --version 1.0.3
#r "nuget: LumConfig, 1.0.3"
#:package LumConfig@1.0.3
#addin nuget:?package=LumConfig&version=1.0.3
#tool nuget:?package=LumConfig&version=1.0.3
LumConfig 1.0.2
A lightweight, reflection-free JSON configuration manager for .NET that supports AOT (Ahead-of-Time) compilation. Easily manage your application's configuration with simple set/get operations and seamless serialization/deserialization.
Quick Start
// Create
LumConfigManager config = new LumConfigManager();
config.Set("findmax", "xx");
config.Set("HotKey", 46);
config.Set("Now", DateTime.Now);
config.Set("TheHotKeys", new int[] { 46, 33, 21 });
config.Set("HotKeys:Mainkey", 426); // Nested configuration
config.Save("d:\\aa.json");
// Read existed file
LumConfigManager loadedConfig = new LumConfigManager("d:\\aa.json");
Console.WriteLine(loadedConfig.GetInt("HotKeys:Mainkey"));
Console.WriteLine(loadedConfig.Get("Now"));
var hotkeys = loadedConfig.Get("TheHotKeys") as IList;
foreach (var key in hotkeys)
{
Console.WriteLine(key);
}
The config file aa.json
{"findmax":"xx","HotKey":46,"Now":"2025/9/11 10:25:50","TheHotKeys":[46,33,21],"HotKeys":{"Mainkey":426}}
Features
- 🚀 AOT-Compatible: Designed to work with AOT compilation environments
- 🔍 Reflection-Free: No runtime reflection required for operation
- 📝 Simple API: Intuitive methods for setting and retrieving values
- 🎯 Type Support: Handles basic JSON types (int, long, double, string, bool) and arrays
- 🔧 Flexible Structure: Supports nested configurations through key path notation
- 💾 Easy Persistence: Simple save/load functionality for JSON files
Installation
Add the library to your project via NuGet (LumConfig).
API Reference
Core Methods
Set(string key, object value): Stores a value with the specified keyGet(string key): Retrieves a value by key (returns object)GetInt(string key): Retrieves an integer value by keySave(string path): Saves configuration to a JSON fileLumConfigManager(string path): Constructor that loads configuration from a file
Supported Value Types
- Basic JSON types:
int,long,double,string,bool - Arrays of supported types
- Complex objects are automatically stringified
- Nested configurations using colon notation (
Parent:Child)
Configuration File Format
The library generates clean JSON files with support for nested structures and arrays.
Use Cases
- Application settings management
- Game configuration systems
- AOT-compatible environments (e.g., Unity IL2CPP)
- Systems where reflection is limited or prohibited
- Lightweight configuration needs without heavy dependencies
Requirements
- .NET Standard 2.0+ or .NET Framework 4.6.1+
- No external dependencies
License
MIT License - feel free to use in your projects!
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.