implement protobuf  Category serialization