You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API returns the X-Result-Count of objects with every bulk-expanded response. We should use that value to specify the initial capacity of collection types.
collection.Capacity==X-Result-Count
Unfortunately, Json.NET does not support specifying a capacity for deserialized lists.
Fortunately, Json.NET supports merging json values with an existing object.
TODO (up for grabs)
update json collection converters to first create a new list with a specified capacity, then let Json.NET populate the list with objects
[Moved from Codeplex: https://gw2dotnet.codeplex.com/workitem/1345]
Inspired by: https://forum-en.guildwars2.com/forum/community/api/Minor-issue-with-X-Result-Total/first#post5103839
The API returns the X-Result-Count of objects with every bulk-expanded response. We should use that value to specify the initial capacity of collection types.
Unfortunately, Json.NET does not support specifying a capacity for deserialized lists.
Fortunately, Json.NET supports merging json values with an existing object.
TODO (up for grabs)
update json collection converters to first create a new list with a specified capacity, then let Json.NET populate the list with objects
The text was updated successfully, but these errors were encountered: