engine v0.1.2 Engine.Storage.Serializer

It’s possible that you want to serialize all your messages to json before sending to the EventStore, or you can choose to save as a binary, or hybrid, like, your event data in binary and the whole Eventstore message in json. To define your event data, go to Engine.Messages, and to serialize the whole message see the Engine.EventStore

@enconder Json | Binary

TODO: fix decode as %Person{} bug, see test result below, and check doc: https://github.com/devinus/poison

code: res == %MyState{state: “good shape”, event_counter: 24} lhs: %{“changes” => nil, “event_counter” => 24, “state” => “good shape”} rhs: %EventStoreTest.MyState{changes: nil, event_counter: 24,

      state: "good shape"}

Summary

Functions

decode(data, struct \\ nil)
encode(data)