A string serialization implementation