Title: In ConvertTo-Json the max allowed depth is 100. However, we should add code to dynamically check if we are running out of stack, and serialize objects with bigger depths. · Issue #3181 · PowerShell/PowerShell · GitHub
Open Graph Title: In ConvertTo-Json the max allowed depth is 100. However, we should add code to dynamically check if we are running out of stack, and serialize objects with bigger depths. · Issue #3181 · PowerShell/PowerShell
X Title: In ConvertTo-Json the max allowed depth is 100. However, we should add code to dynamically check if we are running out of stack, and serialize objects with bigger depths. · Issue #3181 · PowerShell/PowerShell
Description: Steps to reproduce # Create a nested object $end = 101 $start = 1 $previous = @{ Depth = $end Next = $null } ($end-1)..$start | % { $current = @{ Depth = $_ Next = $previous } $previous = $current } $previous | ConvertTo-Json -Depth $end...
Open Graph Description: Steps to reproduce # Create a nested object $end = 101 $start = 1 $previous = @{ Depth = $end Next = $null } ($end-1)..$start | % { $current = @{ Depth = $_ Next = $previous } $previous = $current ...
X Description: Steps to reproduce # Create a nested object $end = 101 $start = 1 $previous = @{ Depth = $end Next = $null } ($end-1)..$start | % { $current = @{ Depth = $_ Next = $previous } $previous = $current ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3181
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"In ConvertTo-Json the max allowed depth is 100. However, we should add code to dynamically check if we are running out of stack, and serialize objects with bigger depths.","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--\u003e\r\n\r\nSteps to reproduce\r\n------------------\r\n```\r\n# Create a nested object\r\n$end = 101\r\n$start = 1\r\n$previous = @{\r\nDepth = $end\r\nNext = $null\r\n}\r\n\r\n($end-1)..$start | % {\r\n$current = @{\r\nDepth = $_\r\nNext = $previous\r\n}\r\n$previous = $current\r\n}\r\n$previous | ConvertTo-Json -Depth $end\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\nPowerShell is able to dynamically check if we are running out of stack, and serialize objects with bigger depths.\r\n\r\nActual behavior\r\n---------------\r\n\r\n```\r\nConvertTo-Json : The maximum depth allowed for serialization is 100.\r\nAt line:1 char:13\r\n+ $previous | ConvertTo-Json -Depth $end\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : InvalidOperation: (:) [ConvertTo-Json], InvalidOperationException\r\n + FullyQualifiedErrorId : ReachedMaximumDepthAllowed,Microsoft.PowerShell.Commands.ConvertToJsonCommand\r\n```\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```powershell\r\n\u003e $PSVersionTable\r\n\r\nPS C:\\windows\\system32\u003e $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nWSManStackVersion 3.0\r\nSerializationVersion 1.1.0.1\r\nPSRemotingProtocolVersion 2.3\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nGitCommitId v6.0.0-alpha.13-139-g152de408523eef294ab8592dd7740dd86c93313f\r\nCLRVersion\r\nPSVersion 6.0.0-alpha\r\nPSEdition Core\r\nBuildVersion 3.0.0.0\r\n\r\n```\r\n","author":{"url":"https://github.com/Francisco-Gamino","@type":"Person","name":"Francisco-Gamino"},"datePublished":"2017-02-22T01:25:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/3181/PowerShell/issues/3181"}
| 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:8321c166-9566-4b7b-529b-f29e9b1c7c65 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 86E0:2D56BD:F6F4E3:14FA32B:6A556C88 |
| html-safe-nonce | 6601ce9cae1df4f2a13dfbf53fc5813610d1892490fa30e299759e884899b415 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkUwOjJENTZCRDpGNkY0RTM6MTRGQTMyQjo2QTU1NkM4OCIsInZpc2l0b3JfaWQiOiI5MDExNDA3MjQ2NDM4MjYzOTQ0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bf5ddef1ac3642341e6dea6ad445f71316e066f4233264c708561ad62ec46638 |
| hovercard-subject-tag | issue:209324733 |
| 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/3181/issue_layout |
| twitter:image | https://opengraph.githubassets.com/357d179a5aab408a47b57cdb1358b8adb97506fd8c60475720f674622d25826d/PowerShell/PowerShell/issues/3181 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/357d179a5aab408a47b57cdb1358b8adb97506fd8c60475720f674622d25826d/PowerShell/PowerShell/issues/3181 |
| og:image:alt | Steps to reproduce # Create a nested object $end = 101 $start = 1 $previous = @{ Depth = $end Next = $null } ($end-1)..$start | % { $current = @{ Depth = $_ Next = $previous } $previous = $current ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Francisco-Gamino |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| 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 | a90bd2a4a25feb75544d06b89350dcf95d9c46e0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width