I want to get a JSON representation of a Hashtable, for example:
@{Path="C:\temp"; Filter="*.js"}
ConvertTo-Json results in:
{ "Path": "C:\\temp", "Filter": "*.js" }
However, if you convert this JSON string using ConvertFrom-Json , you will not get a HashTable, but a PSCustomObject.
So how can you reliably serialize the above Hashmap?
json powershell
Marc
source share