Removed binary serialization and replaced it with JSON equivalent