bindings: DungeonFile.fromJson #454

Closed
opened 2026-10-31 09:31:34 +01:00 by jqueuniet · 0 comments
Owner

SaveGame.fromJson rebuilds a save handle from its dump, but a dungeon only rebuilds through the free dungeonFromJson, which returns bytes.

Proposal

DungeonFile.fromJson(json), a handle from a toJson dump; dungeonFromJson stays as a wrapper or goes, as for the other free functions.

Acceptance

  • DungeonFile.fromJson(file.toJson()).toBytes() equals the original bytes on every fixture (adding toBytes if needed).
`SaveGame.fromJson` rebuilds a save handle from its dump, but a dungeon only rebuilds through the free `dungeonFromJson`, which returns bytes. ## Proposal `DungeonFile.fromJson(json)`, a handle from a `toJson` dump; `dungeonFromJson` stays as a wrapper or goes, as for the other free functions. ## Acceptance - `DungeonFile.fromJson(file.toJson()).toBytes()` equals the original bytes on every fixture (adding `toBytes` if needed).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jqueuniet/dm2-tools#454
No description provided.