LumConfig 1.0.3

dotnet add package LumConfig --version 1.0.3
                    
NuGet\Install-Package LumConfig -Version 1.0.3
                    
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="LumConfig" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LumConfig" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="LumConfig" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LumConfig --version 1.0.3
                    
#r "nuget: LumConfig, 1.0.3"
                    
#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.
#:package LumConfig@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LumConfig&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=LumConfig&version=1.0.3
                    
Install as a Cake Tool

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 key
  • Get(string key): Retrieves a value by key (returns object)
  • GetInt(string key): Retrieves an integer value by key
  • Save(string path): Saves configuration to a JSON file
  • LumConfigManager(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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
1.0.3 160 2/25/2026
1.0.2 269 9/20/2025
1.0.1 242 9/11/2025