Fork me on GitHub

@arohner I have a private project which I use to serialize specced data, where I also store the used spec in either the bytes or the string. I might make it public. It also makes it possible to set defaults, in order to get correctly specced data back, in case you added required keys.


It works both with clojure and clojurescript, but it really needs some more work (liks tests for the clojurescript) before I put it public


@gklijs can you re-create the spec instances from serialized format in cljs without (form) eval?


@ikitommi Doent’t know what you mean exactly, i use the form function to re-create the instance, but by assuming the spec is a map with either keys, or merge, and by storing the data in a certain way, I only store the values. If there is an additional required key which wasn’t there when the instance was serialized, either nil is filled in, or the default is it is set.