{"id":1402,"date":"2022-12-20T17:40:46","date_gmt":"2022-12-20T09:40:46","guid":{"rendered":"https:\/\/www.mapleriver.cn\/?p=1402"},"modified":"2022-12-20T17:40:46","modified_gmt":"2022-12-20T09:40:46","slug":"%e5%93%88%e5%b8%8c%e8%a1%a8-list-dictionary","status":"publish","type":"post","link":"https:\/\/www.mapleriver.cn\/?p=1402","title":{"rendered":"\u54c8\u5e0c\u8868 &#038; List &#038; Dictionary"},"content":{"rendered":"<h1>1.List<\/h1>\n<p><a href=\"https:\/\/referencesource.microsoft.com\/#mscorlib\/system\/collections\/generic\/list.cs\">List\u6e90\u7801<\/a><\/p>\n<p>List\u53ef\u4ee5\u8ba4\u4e3a\u662f\u4e00\u4e2a\u53ef\u4ee5\u81ea\u52a8\u6269\u5bb9\u7684\u6570\u7ec4\uff0c\u6bcf\u6b21\u6269\u5bb9\u540e\u5bb9\u91cf\u7ffb\u500d<\/p>\n<h3>\u6784\u9020\u51fd\u6570:<\/h3>\n<pre><code class=\"language-csharp\">public class List&lt;T&gt; : IList&lt;T&gt;, System.Collections.IList, IReadOnlyList&lt;T&gt;\n{\n    private const int _defaultCapacity = 4;\n\n    private T[] _items;\n    private int _size;\n    private int _version;\n    private Object _syncRoot;\n\n    static readonly T[]  _emptyArray = new T[0];        \n\n    \/\/ Constructs a List. The list is initially empty and has a capacity\n    \/\/ of zero. Upon adding the first element to the list the capacity is\n    \/\/ increased to 16, and then increased in multiples of two as required.\n    public List() {\n        _items = _emptyArray;\n    }\n\n    \/\/ Constructs a List with a given initial capacity. The list is\n    \/\/ initially empty, but will have room for the given number of elements\n    \/\/ before any reallocations are required.\n    \/\/ \n    public List(int capacity) {\n        if (capacity &lt; 0) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.capacity, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);\n        Contract.EndContractBlock();\n\n        if (capacity == 0)\n            _items = _emptyArray;\n        else\n            _items = new T[capacity];\n    }\n\n    \/\/...\n    \/\/\u5176\u4ed6\u5185\u5bb9\n}\n<\/code><\/pre>\n<h3>Add\u51fd\u6570\uff08\u81ea\u52a8\u6269\u5bb9\uff09\uff1a<\/h3>\n<pre><code class=\"language-csharp\">\/\/ Adds the given object to the end of this list. The size of the list is\n\/\/ increased by one. If required, the capacity of the list is doubled\n\/\/ before adding the new element.\n\/\/\npublic void Add(T item) {\n    if (_size == _items.Length) EnsureCapacity(_size + 1);\n    _items[_size++] = item;\n    _version++;\n}\n\n\/\/ Ensures that the capacity of this list is at least the given minimum\n\/\/ value. If the currect capacity of the list is less than min, the\n\/\/ capacity is increased to twice the current capacity or to min,\n\/\/ whichever is larger.\nprivate void EnsureCapacity(int min) {\n    if (_items.Length &lt; min) {\n        int newCapacity = _items.Length == 0? _defaultCapacity : _items.Length * 2;\n        \/\/ Allow the list to grow to maximum possible capacity (~2G elements) before encountering overflow.\n        \/\/ Note that this check works even when _items.Length overflowed thanks to the (uint) cast\n        if ((uint)newCapacity &gt; Array.MaxArrayLength) newCapacity = Array.MaxArrayLength;\n        if (newCapacity &lt; min) newCapacity = min;\n        Capacity = newCapacity;\n    }\n}<\/code><\/pre>\n<h3>Remove\u548cInset\u51fd\u6570\u5e76\u4e0d\u662f\u5355\u7eaf\u7684\u6e05\u7406\u503c\uff0c\u800c\u662f\u8fdb\u884c\u6570\u7ec4\u7684copy\uff1a<\/h3>\n<pre><code class=\"language-csharp\">\/\/ Removes the element at the given index. The size of the list is\n\/\/ decreased by one.\n\/\/ \npublic bool Remove(T item) {\n    int index = IndexOf(item);\n    if (index &gt;= 0) {\n        RemoveAt(index);\n        return true;\n    }\n\n    return false;\n}\n\n\/\/ Returns the index of the first occurrence of a given value in a range of\n\/\/ this list. The list is searched forwards from beginning to end.\n\/\/ The elements of the list are compared to the given value using the\n\/\/ Object.Equals method.\n\/\/ \n\/\/ This method uses the Array.IndexOf method to perform the\n\/\/ search.\n\/\/ \npublic int IndexOf(T item) {\n    Contract.Ensures(Contract.Result&lt;int&gt;() &gt;= -1);\n    Contract.Ensures(Contract.Result&lt;int&gt;() &lt; Count);\n    return Array.IndexOf(_items, item, 0, _size);\n}\n\n\/\/ Removes the element at the given index. The size of the list is\n\/\/ decreased by one.\n\/\/ \npublic void RemoveAt(int index) {\n    if ((uint)index &gt;= (uint)_size) {\n        ThrowHelper.ThrowArgumentOutOfRangeException();\n    }\n    Contract.EndContractBlock();\n    _size--;\n    if (index &lt; _size) {\n        Array.Copy(_items, index + 1, _items, index, _size - index);\n    }\n    _items[_size] = default(T);\n    _version++;\n}\n\/\/ Inserts an element into this list at a given index. The size of the list\n\/\/ is increased by one. If required, the capacity of the list is doubled\n\/\/ before inserting the new element.\n\/\/ \npublic void Insert(int index, T item) {\n    \/\/ Note that insertions at the end are legal.\n    if ((uint) index &gt; (uint)_size) {\n        ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_ListInsert);\n    }\n    Contract.EndContractBlock();\n    if (_size == _items.Length) EnsureCapacity(_size + 1);\n    if (index &lt; _size) {\n        Array.Copy(_items, index, _items, index + 1, _size - index);\n    }\n    _items[index] = item;\n    _size++;            \n    _version++;\n}<\/code><\/pre>\n<h1>2.\u54c8\u5e0c\u51fd\u6570\u4e0e\u54c8\u5e0c\u8868<\/h1>\n<h5>\u54c8\u5e0c\u51fd\u6570\uff1a<\/h5>\n<p>\u5c06\u54c8\u5e0c\u8868\u4e2d\u5143\u7d20\u7684\u5173\u952e\u952e\u503c\u6620\u5c04\u4e3a\u5143\u7d20\u5b58\u50a8\u4f4d\u7f6e\u7684\u51fd\u6570\u3002<\/p>\n<h5>\u54c8\u5e0c\u8868\uff1a<\/h5>\n<p>\u7ed3\u6784\u4e2d\u5b58\u50a8\u4e86key\u7684\u54c8\u5e0c\u503c\u7684\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<p>\u4e00\u822c\u7684\u94fe\u8868\u3001\u6811\u7ed3\u6784\u4e2d\u5b58\u50a8\u4f4d\u7f6e\u662f\u968f\u673a\u7684\uff0c\u67e5\u627e\u8d77\u6765\u6548\u7387\u4f4e\uff0c\u54c8\u5e0c\u8868\u5185\u5b58\u50a8\u4e86\u54c8\u5e0c\u503c\uff0c\u53ef\u4ee5\u5feb\u901f\u8ba1\u7b97\u8981\u67e5\u627e\u9879\u7684\u54c8\u5e0c\u503c\uff0c\u5e76\u67e5\u627e\u5bf9\u5e94\u6570\u636e\u3002<\/p>\n<h5>\u4e3e\u4e2a\u6817\u5b50\uff1a<\/h5>\n<p>\u2003\u2003\u2003\u2003\u6211\u4eec\u73b0\u5728\u9700\u8981\u5b58\u50a8\u4e00\u4e2a\u952e\u503c\u5bf9\u6570\u636eA-B\uff0ckey\u4e3aA\uff0cvalue\u4e3aB\u3002\u4f46\u662fA\u548cB\u6240\u5360\u7528\u7684\u5185\u5b58\u8f83\u5927\uff0c\u800c\u4e14\u67e5\u627e\u7684\u65f6\u5019\u6bd4\u5bf9\u4e5f\u5f88\u56f0\u96be\u3002<\/p>\n<p>\u2003\u2003\u2003\u2003\u8fd9\u4e2a\u65f6\u5019\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u54c8\u5e0c\u8868\u6765\u589e\u52a0\u7d22\u5f15\u901f\u5ea6\uff1a\u5c06A\u901a\u8fc7\u54c8\u5e0c\u51fd\u6570\u8ba1\u7b97\u5f97\u5230A\u7684\u54c8\u5e0c\u503c\uff0c\u7136\u540e\u5c06A\u7684\u54c8\u5e0c\u503c\u548cA\u90fd\u5b58\u5728\u54c8\u5e0c\u8868\u5185\uff0c\u8fd9\u6837\u5728\u67e5\u627e\u7684\u65f6\u5019\u5c31\u53ef\u4ee5\u76f4\u63a5\u8ba1\u7b97\u8981\u67e5\u627e\u76ee\u6807\u7684\u54c8\u5e0c\u503c\u7136\u540e\u53bb\u54c8\u5e0c\u8868\u5185\u8fdb\u884c\u6bd4\u5bf9\uff0c\u5c31\u53ef\u4ee5\u5feb\u901f\u67e5\u627e\u5230\u5bf9\u5e94\u6570\u636e\u3002<\/p>\n<h5>\u54c8\u5e0c\u8868\u7684\u51b2\u7a81\uff1a<\/h5>\n<p>key\u7684\u54c8\u5e0c\u503c\u662f\u901a\u8fc7\u54c8\u5e0c\u51fd\u6570\u8ba1\u7b97\u5f97\u5230\u7684\uff0c\u90a3\u4e48\u5c31\u96be\u4ee5\u907f\u514d\u7684\u4f1a\u51fa\u73b0\u4e0d\u540c\u7684key\u503c\u901a\u8fc7\u54c8\u5e0c\u51fd\u6570\u540e\u5f97\u5230\u76f8\u540c\u7684\u54c8\u5e0c\u503c\u3002<\/p>\n<p>\u8fd9\u79cd\u60c5\u51b5\u6211\u4eec\u6210\u4e3a\u54c8\u5e0c\u51b2\u7a81\uff0c\u89e3\u51b3\u54c8\u5e0c\u51b2\u7a81\u7684\u65b9\u6cd5\u6bd4\u8f83\u591a\uff0c\u5982\u62c9\u94fe\u6cd5\uff0c\u591a\u54c8\u5e0c\u6cd5\uff0c\u5f00\u653e\u5730\u5740\u6cd5\u7b49\u7b49\u3002\u4e0d\u8fc7\u76ee\u524d\u53ea\u6709\u62c9\u94fe\u6cd5\u53ef\u4ee5\u5b8c\u5168\u89e3\u51b3\u54c8\u5e0c\u51b2\u7a81\u7684\u95ee\u9898\u3002<\/p>\n<h5>\u62c9\u94fe\u6cd5\uff1a<\/h5>\n<p>\u4e3b\u8981\u601d\u60f3\u5c31\u662f\u5728\u5b58\u50a8\u65f6\u4f7f\u7528\u4e00\u4e2a\u989d\u5916\u7684\u52a8\u6001\u94fe\u8868\u4ee3\u66ff\u987a\u5e8f\u5b58\u50a8\u7ed3\u6784\u3002<\/p>\n<p>\u4ee5C#\u7684Dictionary\u4e3a\u4f8b\uff0c\u62c9\u94fe\u6cd5\u7684\u5b9e\u73b0\u6b65\u9aa4\u4e3a\uff1a<\/p>\n<p>1.\u8ba1\u7b97Key\u7684HashValue<\/p>\n<p>2.\u6839\u636e HashValue \u5b9a\u4f4d\u5230 table[hashIndex]\uff08table[hashIndex] \u4e3a\u4e00\u4e2a\u94fe\u8868\u7684Node\uff09<\/p>\n<p>3.\u5982\u679c table[hashIndex] \u4e3a\u7a7a\u5219\u76f4\u63a5\u63d2\u5165\uff0c\u4e0d\u7136\u5219\u6dfb\u52a0\u5230\u94fe\u8868\u672b\u5c3e<\/p>\n<h1>3.Dictionary<\/h1>\n<h5>\u6570\u636e\u5b58\u50a8\u4e0e\u6784\u9020\u51fd\u6570\uff1a<\/h5>\n<pre><code class=\"language-csharp\">       private struct Entry {\n            public int hashCode;    \/\/ Lower 31 bits of hash code, -1 if unused\n            public int next;        \/\/ Index of next entry, -1 if last\n            public TKey key;           \/\/ Key of entry\n            public TValue value;         \/\/ Value of entry\n        }\n\n        private int[] buckets;\n        private Entry[] entries;\n\n        public Dictionary(int capacity, IEqualityComparer&lt;TKey&gt; comparer) {\n            if (capacity &lt; 0) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.capacity);\n            if (capacity &gt; 0) Initialize(capacity);\n            this.comparer = comparer ?? EqualityComparer&lt;TKey&gt;.Default;\n            \/\/\u5176\u4ed6\u4ee3\u7801\n        }\n\n        private void Initialize(int capacity) {\n            int size = HashHelpers.GetPrime(capacity);\n            buckets = new int[size];\n            for (int i = 0; i &lt; buckets.Length; i++) buckets[i] = -1;\n            entries = new Entry[size];\n            freeList = -1;\n        }<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\u521d\u59cb\u5316\u7684\u65f6\u5019\u4e3b\u8981\u5c31\u662f\u521d\u59cb\u5316\u4e86size\u3001buckets\u548centries\u3002<\/p>\n<p>Entry\uff1a\u62c9\u94fe\u8868\u4e2d\u52a8\u6001\u94fe\u8868\u7684\u8282\u70b9\uff0c\u4e5f\u5c31\u662f\u4e0a\u9762\u8bf4\u7684Node<\/p>\n<p>buckets\u4e0eentries\uff1abuckets\u5b58\u50a8\u54c8\u5e0c\u503c\u5bf9\u5e94\u5230\u7684Entry\u7684\u7d22\u5f15\uff0centries\u5219\u4e3anode\u7684\u5b58\u50a8\u96c6\u5408\u3002<\/p>\n<h5>\u6dfb\u52a0\u8282\u70b9<\/h5>\n<pre><code class=\"language-csharp\">         public void Add(TKey key, TValue value) {\n            Insert(key, value, true);\n        }\n\n        private void Insert(TKey key, TValue value, bool add) {\n            if( key == null ) {\n                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key);\n            }\n\n            if (buckets == null) Initialize(0);\n            int hashCode = comparer.GetHashCode(key) &amp; 0x7FFFFFFF;\n            int targetBucket = hashCode % buckets.Length;\n\n#if FEATURE_RANDOMIZED_STRING_HASHING\n            int collisionCount = 0;\n#endif\n\n            for (int i = buckets[targetBucket]; i &gt;= 0; i = entries[i].next) {\n                if (entries[i].hashCode == hashCode &amp;&amp; comparer.Equals(entries[i].key, key)) {\n                    if (add) { \n                        ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_AddingDuplicate);\n                    }\n                    entries[i].value = value;\n                    version++;\n                    return;\n                } \n\n#if FEATURE_RANDOMIZED_STRING_HASHING\n                collisionCount++;\n#endif\n            }\n            int index;\n            if (freeCount &gt; 0) {\n                index = freeList;\n                freeList = entries[index].next;\n                freeCount--;\n            }\n            else {\n                if (count == entries.Length)\n                {\n                    Resize();\n                    targetBucket = hashCode % buckets.Length;\n                }\n                index = count;\n                count++;\n            }\n\n            entries[index].hashCode = hashCode;\n            entries[index].next = buckets[targetBucket];\n            entries[index].key = key;\n            entries[index].value = value;\n            buckets[targetBucket] = index;\n            version++;\n            \/\/\u4e00\u5806\u5b8f\u5904\u7406\n        }<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\uff1a\u5f53\u6765\u4e86\u4e00\u4e2akey-value\u8981\u5b58\u50a8\u65f6\uff0c\u5148\u901a\u8fc7\u54c8\u5e0c\u51fd\u6570\u8ba1\u7b97key\u7684\u54c8\u5e0c\u503c\uff0c\u7136\u540e\u518d\u8ba1\u7b97targetBucket\uff0c\u5373\u8fd9\u4e2a\u54c8\u5e0c\u503c\u5e94\u8be5\u653e\u5230\u54ea\u4e2abuckets\u6876\u5185\uff08\u5176\u5b9e\u5c31\u662f\u8ba1\u7b97\u7684\u54c8\u5e0c\u503c\u4e0ebuckets\u957f\u5ea6\u53d6\u4f59\uff09\uff0c\u6bd4\u5982\u8fd9\u91cc\u8ba1\u7b97\u540e\u7684\u7ed3\u679c\u662f1\u53f7\u6876\u3002<\/p>\n<p>\u901a\u8fc7buckets[1]\u53ef\u4ee5\u62ff\u5230\u5bf9\u5e94\u8282\u70b9Entry\u7684ID\uff0c\u7136\u540eentries[EntryID]\u5c31\u53ef\u4ee5\u62ff\u5230\u52a8\u6001\u94fe\u8868\u7684\u5934\u8282\u70b9\u3002<\/p>\n<p>\u6700\u540e\u6dfb\u52a0\u8282\u70b9\u5230\u94fe\u8868\u5185\uff1a\u4e5f\u5c31\u662f\u6784\u5efa\u4e00\u4e2a\u65b0\u7684Entry\uff0c\u7136\u540e\u8fd9\u4e2aEntry\u7684next\u6307\u5411\u4e4b\u524dbuckets[1]\u7684EntryID\uff0c\u7136\u540ebuckets[1]\u5185\u7f13\u5b58\u65b0\u6784\u5efa\u7684EntryID\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<h5>\u67e5\u627e\u8282\u70b9<\/h5>\n<p>\u5176\u5b9e\u4e0d\u7528\u770b\u4ee3\u7801\u4e5f\u80fd\u77e5\u9053\uff0c\u6211\u4eec\u628a\u4e00\u4e2a\u5f88\u957f\u7684\u7ebf\u6027\u8868\u62c6\u6210\u4e86\u51e0\u4efd\u5c0f\u7684\u7ebf\u6027\u8868\uff0c\u5e76\u901a\u8fc7\u54c8\u5e0c\u503c\u8fdb\u884c\u5feb\u901f\u67e5\u627e\uff0c\u4ece\u800c\u80fd\u66f4\u5feb\u7684\u67e5\u627e\u5230\u7ed3\u679c\u3002<\/p>\n<pre><code class=\"language-csharp\">        public bool ContainsKey(TKey key) {\n            return FindEntry(key) &gt;= 0;\n        }\n        private int FindEntry(TKey key) {\n            if( key == null) {\n                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key);\n            }\n\n            if (buckets != null) {\n                int hashCode = comparer.GetHashCode(key) &amp; 0x7FFFFFFF;\n                for (int i = buckets[hashCode % buckets.Length]; i &gt;= 0; i = entries[i].next) {\n                    if (entries[i].hashCode == hashCode &amp;&amp; comparer.Equals(entries[i].key, key)) return i;\n                }\n            }\n            return -1;\n        }\n<\/code><\/pre>\n<p>\u4ee3\u7801\u4e5f\u6bd4\u8f83\u7b80\u5355\uff0c\u5c31\u662f\u627e\u5230\u5bf9\u5e94\u7684\u52a8\u6001\u94fe\u8868\u5934\u8282\u70b9\uff0c\u7136\u540e\u4f9d\u6b21\u6bd4\u5bf9\u54c8\u5e0c\u503c\u548c\u5bf9\u5e94key\u503c\u5c31\u77e5\u9053\u662f\u4e0d\u662f\u67e5\u627e\u5230\u4e86\u3002<\/p>\n<h1>4.\u5176\u4ed6\u7684\u54c8\u5e0c\u8868\u4f18\u5316<\/h1>\n<p>Dictionary\u4e2d\u9664\u4e86\u5b58\u50a8key\u503c\u7684\u54c8\u5e0c\u503c\uff0c\u4e5f\u7f13\u5b58\u4e86\u8981\u5b58\u50a8\u7684key-value\u672c\u8eab\u3002\u4f46\u662f\u6709\u7684\u65f6\u5019\u4e3a\u4e86\u4f18\u5316\u8d44\u6e90\u51cf\u5c11\u5185\u5b58\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u4f7f\u7528\u54c8\u5e0c\u8868\u8fdb\u884c\u5185\u5b58\u4f18\u5316\u3002<\/p>\n<p>\u4f8b\u5982\uff1a\u7ffb\u8bd1\u8868\u7684\u683c\u5f0f\u4e3aKey-Value\u952e\u503c\u5bf9\uff08\u4e2d\u6587-\u5176\u4ed6\u8bed\u8a00\uff09\uff0c\u53ef\u4ee5\u8ba1\u7b97key\u7684\u54c8\u5e0c\u503c\uff0c\u5e76\u5728\u7f13\u5b58\u6570\u636e\u65f6\u4f7f\u7528\u54c8\u5e0c\u503c\u4f5c\u4e3akey\u8fdb\u884c\u5b58\u50a8\uff0c\u67e5\u627e\u65f6\u4e5f\u5c06\u8981\u67e5\u627e\u7684key\u8f6c\u6362\u4e3a\u54c8\u5e0c\u503c\u540e\u518d\u8fdb\u884c\u5339\u914d\u3002<\/p>\n<pre><code class=\"language-csharp\">         \/\/\u5b58\u503c\u7684\u65f6\u5019\u4f18\u5148\u5b58\u5230\u54c8\u5e0c\u8868\u5185\uff0c\u5982\u679c\u54c8\u5e0c\u51b2\u7a81\u4e86\uff0c\u653e\u8fdbstring\u8868\n        public void Add(string key, string value)\n        {\n            uint hash = CalHashCode(key);\n            if (!m_HashKey.ContainsKey(hash))\n            {\n                m_HashKey.Add(hash, value.Encode2Uint());\n            }\n            else\n            {\n                m_StringKey.Add(key, value);\n            }\n        }\n\n        \/\/\u53d6\u503c\u7684\u65f6\u5019\u4f18\u5148\u53bbstring\u8868\u4e2d\u67e5\u627e\u662f\u5426\u51b2\u7a81\u8fc7\uff0c\u5982\u679c\u6ca1\u67e5\u5230\uff0c\u8bf4\u660e\u53ef\u80fd\u6ca1\u51b2\u7a81\uff0c\u518d\u53bb\u54c8\u5e0c\u8868\u5185\u627e\n        public bool TryGetValue(string key, out string value)\n        {\n            if (!m_StringKey.TryGetValue(key, out value))\n            {\n                \/\/ \u5982\u679cm_StringKey\u4e0d\u5305\u542b\uff0c\u5219\u53bbm_HashKey\u4e2d\u67e5\u627e\n                uint hash = CalHashCode(key);\n                if (!m_HashKey.TryGetValue(hash, out value))\n                {\n                    return false;\n                }\n            }\n\n            return true;\n        }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1.List List\u6e90\u7801 List\u53ef\u4ee5\u8ba4\u4e3a\u662f\u4e00\u4e2a\u53ef\u4ee5\u81ea\u52a8\u6269\u5bb9\u7684\u6570\u7ec4\uff0c\u6bcf\u6b21\u6269\u5bb9\u540e\u5bb9\u91cf\u7ffb\u500d \u6784\u9020\u51fd\u6570: publ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"class_list":["post-1402","post","type-post","status-publish","format-standard","hentry","category-39"],"_links":{"self":[{"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=\/wp\/v2\/posts\/1402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1402"}],"version-history":[{"count":1,"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=\/wp\/v2\/posts\/1402\/revisions"}],"predecessor-version":[{"id":1403,"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=\/wp\/v2\/posts\/1402\/revisions\/1403"}],"wp:attachment":[{"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mapleriver.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}