Moved bemjson serialization to module