Title: Deserialized Ordered Dictionary via Import-Clixml is not numerically indexable. · Issue #2861 · PowerShell/PowerShell · GitHub
Open Graph Title: Deserialized Ordered Dictionary via Import-Clixml is not numerically indexable. · Issue #2861 · PowerShell/PowerShell
X Title: Deserialized Ordered Dictionary via Import-Clixml is not numerically indexable. · Issue #2861 · PowerShell/PowerShell
Description: Steps to reproduce # create ordered dictionary via [ordered] syntactic sugar $a = [ordered]@{} $a['Larry'] = 'Poik!' $a['Curly'] = 'Nyuk!' $a['Moe'] = 'Wise guy!' # get 2nd item from ordered hash $a[1] # returns: Nyuk! # Persist to disk ...
Open Graph Description: Steps to reproduce # create ordered dictionary via [ordered] syntactic sugar $a = [ordered]@{} $a['Larry'] = 'Poik!' $a['Curly'] = 'Nyuk!' $a['Moe'] = 'Wise guy!' # get 2nd item from ordered hash $...
X Description: Steps to reproduce # create ordered dictionary via [ordered] syntactic sugar $a = [ordered]@{} $a['Larry'] = 'Poik!' $a['Curly'] = 'Nyuk!' $a['Moe'] = 'W...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/2861
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deserialized Ordered Dictionary via Import-Clixml is not numerically indexable.","articleBody":"\u003c!--\r\n\r\nIf it is a bug report:\r\n- make sure you are able to repro it on the latest released version. \r\nYou can install the latest version from https://github.com/PowerShell/PowerShell/releases\r\n- Search the existing issues.\r\n- Refer to the [FAQ](../docs/FAQ.md).\r\n- Refer to the [known issues](../docs/KNOWNISSUES.md).\r\n- Fill out the following repro template\r\n\r\nIf it's not a bug, please remove the template and elaborate the issue in your own words.\r\n-->\r\nSteps to reproduce\r\n------------------\r\n\r\n```\r\n# create ordered dictionary via [ordered] syntactic sugar\r\n$a = [ordered]@{}\r\n$a['Larry'] = 'Poik!'\r\n$a['Curly'] = 'Nyuk!'\r\n$a['Moe'] = 'Wise guy!'\r\n\r\n# get 2nd item from ordered hash\r\n$a[1]\r\n# returns: Nyuk!\r\n\r\n# Persist to disk\r\n$a | Export-Clixml ./tempObject.xml\r\n\r\n# Deserialize\r\n$b = Import-Clixml ./tempObject.xml\r\n\r\n# get 2nd item from rehydrated ordered hash\r\n$b[1]\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```\r\n# returns: Nyuk!\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```\r\n# returns: $null\r\n\r\n$a | Get-Member\r\n TypeName: System.Collections.Specialized.OrderedDictionary\r\n...\r\n\r\n$b | Get-Member\r\n TypeName: Deserialized.System.Collections.Specialized.OrderedDictionary\r\n...\r\n```\r\nDeserialized object does not have the full implementation of the original OrderedDictionary object.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\n> $PSVersionTable\r\nName Value\r\n---- -----\r\nSerializationVersion 1.1.0.1\r\nPSEdition Core\r\nBuildVersion 3.0.0.0\r\nPSRemotingProtocolVersion 2.3\r\nWSManStackVersion 3.0\r\nPSVersion 6.0.0-alpha\r\nGitCommitId v6.0.0-alpha.13-42-gf38d09dc6d7bf208cd78d86e1...\r\nCLRVersion\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\n```\r\n","author":{"url":"https://github.com/HipCzeck","@type":"Person","name":"HipCzeck"},"datePublished":"2016-12-08T19:15:12Z","url":"https://github.com/PowerShell/PowerShell/issues/2861"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4135da27-daf6-9861-64cc-5b2aafc8eb2b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D680:178F0E:6CDE75:9CB93F:6AFD91A9 |
| html-safe-nonce | 0dd0294822986c19c7b5c67d36b012d8a0b889ba2e5f15ff25be638d6382771a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjgwOjE3OEYwRTo2Q0RFNzU6OUNCOTNGOjZBRkQ5MUE5IiwidmlzaXRvcl9pZCI6IjI0ODA5MDI1MDIxNDkzNjIwODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6e2ad9b0ee1668ceaa3a6cb9dceed286bb5d9b5b655b3976add509fadbb99762 |
| hovercard-subject-tag | issue:194419781 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/2861/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8a37305cabaaeaa08b4303b2e77a545954202a21511c9e53a5c804ec5473090a/PowerShell/PowerShell/issues/2861 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a37305cabaaeaa08b4303b2e77a545954202a21511c9e53a5c804ec5473090a/PowerShell/PowerShell/issues/2861 |
| og:image:alt | Steps to reproduce # create ordered dictionary via [ordered] syntactic sugar $a = [ordered]@{} $a['Larry'] = 'Poik!' $a['Curly'] = 'Nyuk!' $a['Moe'] = 'Wise guy!' # get 2nd item from ordered hash $... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | HipCzeck |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width