Serialization for sensors