Thursday, August 16, 2018

ConvertTo-Json has a very shallow -Depth by default

PowerShell's ConvertTo-Json cmdlet can turn a hierarchy of objects into a JSON document. By default, though, objects just two reference layers down will be stringified instead of serialized to JSON. This can be adjusted with the -Depth parameter.

No comments:

Post a Comment