https://github.com/tinwhistler/simplejsonconfig
A dead-simple JSON config reader for .NET with no ceremony, no POCOs, and no DI.
https://github.com/tinwhistler/simplejsonconfig
configuration csharp dotnet dotnet-library json minimalist nuget poco simple
Last synced: 5 months ago
JSON representation
A dead-simple JSON config reader for .NET with no ceremony, no POCOs, and no DI.
- Host: GitHub
- URL: https://github.com/tinwhistler/simplejsonconfig
- Owner: tinwhistler
- License: mit
- Created: 2025-08-04T21:32:48.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-09T08:45:37.000Z (10 months ago)
- Last Synced: 2025-10-10T04:17:24.661Z (8 months ago)
- Topics: configuration, csharp, dotnet, dotnet-library, json, minimalist, nuget, poco, simple
- Language: C#
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SimpleJsonConfig
A dead-simple JSON config reader for .NET.
No ceremony. No POCOs. No dependency injection. No religion.
## Why?
Because modern .NET decided configuration needed to be a lifestyle choice.
You know the drill:
- Inject `IConfiguration` into something.
- Set up 12 layers of config providers.
- Bind to a POCO with optional snake_case massaging.
- Forget where your setting actually came from.
- Discover that what you *really* wanted was `GetValue()`.
Meanwhile, you just wanted to read a number from a file.
## No Metadata. No Bloat. Just Your Stuff.
Your config file should contain the values you care about.
Not Logging.Levels.
Not AllowedHosts.
Not IConfigurationBuilder wizardry.
Just the settings your app needs to run — nothing more.
No ceremony, no scaffolding, no blessed JSON shape from on high.
Like an INI file, but without pretending we're still in 1998.
## What This Does
It loads a JSON file and gives you strongly-typed values.
You call `Config.Get("key")`. You get the value. That’s it.
Supports all the basic types you care about:
- `string`
- `bool`
- `int`, `long`, `short`, `byte`
- `float`, `decimal`
- `Guid`
If you're trying to deserialize a polymorphic object graph or need runtime hot-reload across 3 microservices, this isn’t for you. Go enjoy your framework ceremony.
If you want to read `"maxUsers": 25` and move on with your life, welcome.
## Example
Look at `SimpleJsonConfig.TestApp` for an example in use.
One line to load your config file. One line to get a value from it.
That's it. Simple. The way we used to do it back in the day of INI files.
## License
MIT. Use it, break it, fork it, pretend you wrote it. I won't chase you.