Web-facing serialization scheme: self-contained JSON vs filesystem + sidecars #307
Labels
No labels
area/ci-release
area/cli
area/docs
area/dungeon
area/ftl
area/graphics
area/gui
area/music
area/saves
area/tooling
port/amiga
port/dos
port/fm-towns
port/mac
port/pc98
port/sega-cd
priority/high
priority/low
priority/medium
type/bug
type/chore
type/docs
type/feature
type/research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jqueuniet/dm2-tools#307
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Question
The DM2 JSON formats designed so far —
dm2-dungeon'sjson::skprojectdump and theplanned graphics/asset exports — assume a filesystem layout: a structured JSON
document alongside sidecar binary files (PNG images, WAV/PCM sounds, raw blobs). A
browser has no filesystem to scatter sidecars across. What serialization scheme should
the web path use, and how does it reconcile with the desktop/filesystem scheme?
What we know
dm2-dungeon's existingjson::skprojectdump is one-way and lossy (it re-implementsthe retired C#
convertDungeonDatToJsoninterop format; e.g.start_mapis hardcodedto 0 with the comment "No header field carries the start map"). Not round-trippable.
to_bytes/write_to, tested against fixtures.not-yet-decoded sections embedded as base64, so a single JSON round-trips byte-exact
with no sidecar files. That is inherently web-friendly.
heavy, whereas a filesystem dump would use PNG sidecars.
Options to weigh
on the web).
for filesystem).
How we'd confirm
Pick a scheme that (a) round-trips byte-exact for dungeon/saves, (b) keeps graphics
payloads tractable in the browser, and (c) shares one owned document model with the
filesystem tooling. Prototype against a saves fixture and a graphics fixture.
Notes
Gates the web exposure in #301 and the graphics lossless-JSON work. The per-format
lossless serializers (saves, dungeon) can proceed in parallel since their self-contained
form is already web-compatible; this issue settles the cross-cutting policy, especially
for graphics.
Labels
type/research,area/tooling,priority/medium.