https://github.com/mlange-42/ark-serde
JSON serialization and deserialization for the Ark Entity Component System (ECS).
https://github.com/mlange-42/ark-serde
ecs entity-component-system json serde serde-json
Last synced: 2 months ago
JSON representation
JSON serialization and deserialization for the Ark Entity Component System (ECS).
- Host: GitHub
- URL: https://github.com/mlange-42/ark-serde
- Owner: mlange-42
- License: mit
- Created: 2025-03-01T12:00:11.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-23T18:19:37.000Z (7 months ago)
- Last Synced: 2025-08-01T00:30:06.944Z (2 months ago)
- Topics: ecs, entity-component-system, json, serde, serde-json
- Language: Go
- Homepage: https://pkg.go.dev/github.com/mlange-42/ark-serde
- Size: 72.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Ark Serde
[](https://github.com/mlange-42/ark-serde/actions/workflows/tests.yml)
[](https://coveralls.io/github/mlange-42/ark-serde?branch=main)
[](https://goreportcard.com/report/github.com/mlange-42/ark-serde)
[](https://pkg.go.dev/github.com/mlange-42/ark-serde)
[](https://github.com/mlange-42/ark-serde)
[](https://github.com/mlange-42/ark-serde/blob/main/LICENSE)*Ark Serde* provides JSON serialization and deserialization for the [Ark](https://github.com/mlange-42/ark) Entity Component System (ECS).
## Features
- Serialize/deserialize an entire Ark world in one line.
- Proper serialization of entity relations, as well as of entities stored in components.
- Skip arbitrary components and resources when serializing or deserializing.
- Optional in-memory GZIP compression for vast reduction of file sizes.## Installation
```
go get github.com/mlange-42/ark-serde
```## Usage
See the [API docs](https://pkg.go.dev/github.com/mlange-42/ark-serde) for more details and examples.
[](https://pkg.go.dev/github.com/mlange-42/ark-serde)Serialize a world:
```go
jsonData, err := arkserde.Serialize(&world)
if err != nil {
// handle the error
}
```Deserialize a world:
```go
err = arkserde.Deserialize(jsonData, &world)
if err != nil {
// handle the error
}
```## License
This project is distributed under the [MIT licence](./LICENSE).