Skip to content

Instantly share code, notes, and snippets.

@chriskuech
Created May 5, 2019 04:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriskuech/660459d5fcdf5d443d3e4aaf45b035a3 to your computer and use it in GitHub Desktop.
Save chriskuech/660459d5fcdf5d443d3e4aaf45b035a3 to your computer and use it in GitHub Desktop.
$container = "./container"
# Serialize
$setOfDeepObjects | % {$_ | ConvertTo-Json | Out-File "$container/$($_.SomeUniqueKeyOnEachObject).json"}
# Deserialize
$setOfDeepObjects = Get-ChildItem "$container/*.json" | % {Get-Content $_ | ConvertFrom-Json}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment