philippgille/gokv

Make file ending optional in file implementation

philippgille opened this issue · 0 comments

When using the file package, files are stored as <key>.json or <key>.gob. But in case the client switches back and forth between the marshal formats, while using the same keys, this can lead to redundant and/or stale data.
Redundant: Save "a":"x" as JSON, then as gob
Stale: Save "a":"x" as JSON, then change it to "a":"y" and save as gob, then switch back to JSONand load "a" -> results in "x", which is old