https://github.com/elky84/jsontable
JSON mapping to C# container.
https://github.com/elky84/jsontable
csharp dotnet json nuget
Last synced: 2 months ago
JSON representation
JSON mapping to C# container.
- Host: GitHub
- URL: https://github.com/elky84/jsontable
- Owner: elky84
- License: mit
- Created: 2022-01-05T09:25:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-16T07:32:08.000Z (over 1 year ago)
- Last Synced: 2025-09-17T20:02:55.827Z (10 months ago)
- Topics: csharp, dotnet, json, nuget
- Language: C#
- Homepage:
- Size: 67.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://elky84.github.io)


[](https://github.com/elky84/JsonTable/actions/workflows/publish_github.yml)
[](https://github.com/elky84/JsonTable/actions/workflows/publish_nuget.yml)







# JsonTable
## introduce
Easily usable Json to Table (dictionary and mores).
Use Newtonsoft.json.
## usage
### definition
```csharp
[Table(@"json")]
public partial class TableItem : BaseDict
{
}
```
### load
```csharp
MasterTable.Load("ItemGenerator.Table");
```
### use
```csharp
var data = MasterTable.From();
```
```csharp
MasterTable.From().FirstOrDefault(x => x.Id == id);
```
## Support Types
* BaseList
* `List`
* BaseDict
* `Dictionary`
* BaseMultiDict
* `Dictionary>`
* Similar C++ stl Multimap
* Example
```csharp
[Table(@"json")]
public partial class TableItemByType : BaseMultiDict
{
public TableItemByType() : base("Type") // input key property name
{
}
}
```
## Reference
[Cli](https://github.com/elky84/JsonTable/Cli/Program.cs)
## Version History
### v1.0.15
BaseMultiDict supply Composite Key.
### v1.0.14
Modified the Load function interface behavior to allow loading from multiple assemblies.
### v1.0.13
Remove nullable return of MasterTable and return an exception when requesting an invalid type.
### v1.0.12
Added Json load optional method. (virtual interface, for Unity3D)
### v1.0.11
Added Container methods (get internal container)
### v1.0.10
Added Clone methods
### v1.0.9
TargetFramework to netstandard2.1
### v1.0.8
Fixed Nullable rule.
### v1.0.7
Load from Binary path. (Full Path)
### v1.0.6
Exception process reinforcement.
### v1.0.5
Features added MultiDict. (like c++ stl multimap)
### v1.0.4
Supports OnLoad() function to set configuration rules when container is loaded.
### v1.0.3
Tables now only require a folder path. (The full path is not required.)
### v1.0.1
removed nullable property on container (BaseDict and BaseList).