不要序列化对象本身,而是把数据从对象中提取出来,放到一个字典里,然后再序列化那个字典。
Rather than serializing the object, pull the data out of the object and put it into a dictionary. Then serialize the dictionary.
在接下来两篇文章中,我们将探讨更强大、更方便的数据结构的应用:有序列表和随机访问字典。
In the next two articles, we'll explore the use of much more powerful and convenient data structures: ordered lists and random-access dictionaries.
结果应该是一个字典,从前缀到一个可能的后缀组成的序列的映射。
The result should be a dictionary that maps from prefixes to a collection of possible suffixes.
然而,在这种情况下,字典必须在序列被更改的时候来维护以便于它能同序列真正的成员关系同步。
However, in this case, the dictionary must be maintained as the sequence is modified, so that it stays in sync with the actual membership of the sequence.
因为排序是一个仅仅对序列有意义的概念。这大概意味着你想让字典的序列的值按照通过排列的键值顺序获得。
Because sorting is a concept that only makes sense for sequences, this presumably means that you want a sequence of the values of the dictionary in the order obtained by sorting the keys.
在操作上重复o (N)行为损害了性能。但是你不能切换去使用一个字典,因为你需要这个序列的顺序。
The o (n) behavior of repeated in operators hurts performance, but you can't switch to using just a dictionary, as you also need the sequence's order.
如果那个策略被需要,在字典里的值应该可能是在序列里的每个键的值的出现的次数的总和。
If that strategy is desired, the values in the dictionary should probably be a count of the number of occurrences of each key's value in the sequence.
请求序列化是为了从URL字符串创建出编码后的参数,或者是序列字典,或者是HTTP实体。
Request serializers create requests from URL strings, encoding parameters as either a query string or HTTP body.
字典中存储的值必须是可序列化的。
字典中存储的值必须是可序列化的。
应用推荐