fix unittest failure
implement json format for protobuf (like text format)