Gloam.Data
0.7.0
dotnet add package Gloam.Data --version 0.7.0
NuGet\Install-Package Gloam.Data -Version 0.7.0
<PackageReference Include="Gloam.Data" Version="0.7.0" />
<PackageVersion Include="Gloam.Data" Version="0.7.0" />
<PackageReference Include="Gloam.Data" />
paket add Gloam.Data --version 0.7.0
#r "nuget: Gloam.Data, 0.7.0"
#:package Gloam.Data@0.7.0
#addin nuget:?package=Gloam.Data&version=0.7.0
#tool nuget:?package=Gloam.Data&version=0.7.0
Gloam.Data
JSON-driven entity management with schema validation for Gloam engine
Overview
Gloam.Data provides a powerful, data-driven approach to game entity management. Define your game entities in JSON with automatic schema validation and efficient serialization using System.Text.Json source generation.
Features
- JSON-Driven Entities: Define entities in JSON with automatic validation
- Schema Validation: Auto-generated JSON schemas from C# classes
- Source Generation: High-performance serialization with
JsonSerializerContext
- Entity Management: Base classes and utilities for game entities
- Content Loading: Flexible content loading system with multiple providers
Quick Start
using Gloam.Data.Entities;
using Gloam.Data.Json;
// Define an entity in JSON
var playerJson = """
{
"id": "player",
"name": "Player Character",
"visual": {
"glyph": "@",
"foreground": "#FFD700"
},
"stats": {
"health": 100,
"mana": 50
}
}
""";
// Deserialize with validation
var player = JsonSerializer.Deserialize<PlayerEntity>(playerJson, GloamDataJsonContext.Default.PlayerEntity);
Key Components
- Entity System:
BaseGloamEntity
and derived classes - JSON Context:
GloamDataJsonContext
for optimized serialization - Schema Validation:
JsonSchemaValidator
for runtime validation - Content Loading: Flexible loading system with multiple content providers
Entity Definition
Entities inherit from BaseGloamEntity
and are automatically validated against generated JSON schemas:
public class PlayerEntity : BaseGloamEntity
{
public VisualComponent Visual { get; set; }
public StatsComponent Stats { get; set; }
}
Documentation
License
MIT License - see LICENSE for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
-
net9.0
- Gloam.Core (>= 0.7.0)
- JsonSchema.Net (>= 7.4.0)
- JsonSchema.Net.Generation (>= 5.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Gloam.Data:
Package | Downloads |
---|---|
Gloam.Runtime
High-performance dependency injection host for roguelike games with optimized game loop, scene management, and layer rendering. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.7.0 | 156 | 8/31/2025 |
Initial release with JSON entity system and schema validation.