在调试视图中:
这是编码成混乱字符串的代码......
((S2CEnterCollection)objS2c).toByteString().toStringUtf8();
输出:
���"default(
���"default(
���"default(
���"default(
���"default(
����"default(
����"default(
�����"default(
这是具有正确字符串的代码:
((S2CEnterCollection)objS2c).toString()
原来的字符串是:
cardList {
cardId: 100001
liked: 100
number: 10
finder: "default"
rank: 1
}
cardList {
cardId: 100002
liked: 123
number: 10
finder: "default"
rank: 1
}
cardList {
cardId: 100003
liked: 543
number: 10
finder: "default"
rank: 1
}
cardList {
cardId: 100004
liked: 766
number: 10
finder: "default"
rank: 1
}
cardList {
cardId: 100005
liked: 78
number: 10
finder: "default"
rank: 1
}
cardList {
cardId: 100006
liked: 89
number: 123
finder: "default"
rank: 1
}
cardList {
cardId: 100007
liked: 199
number: 567
finder: "default"
rank: 1
}
cardList {
cardId: 100008
liked: 90909
number: 232
finder: "default"
rank: 1
}
那么,有人知道它是如何工作的吗?