7 Responses

  1. Robin
    Robin at |

    Extremely well written and helped me clarify just how to get that array of items contained with [ ] for a JSON string. Crucial step was also -Depth. Thanks!

    Reply
  2. Sanjeev Sharma
    Sanjeev Sharma at |

    Excellent information. I was struggling with System.Collections.Hashtable for a couple of days till I came across this article. Thank you !

    Reply
  3. Marc
    Marc at |

    Any idea how to get a JSON representation of a Hashtable such as this:
    @{Path=”C:\temp”; Filter=”*.js”}

    If you ConvertTo-Json you get
    {
    “Path”: “C:\\temp”,
    “Filter”: “*.js”
    }

    but if you convert that JSON back with ConvertFrom-Json you don’t get a HashTable but a PSCustomObject.

    Reply
  4. William
    William at |

    The DEPTH parameter, exactly what I was looking for. Thank you!

    Reply
  5. krsh
    krsh at |

    It’s very helpful. Thanks alot…..

    Reply
  6. fhneundr6ie4d6un
    fhneundr6ie4d6un at |

    Thanks a lot. Very very helpfull to start with powershell and json

    Reply
  7. Dany Benjamin
    Dany Benjamin at |

    I’ve searched the entire web to figure out why powershell adds the ‘@’ symbol to all my JSONs. I needed it as a fully expanded JSON to submit to an API I was using (ambari). After two days of searching all of the internet, I am thankful that I found this page with the ‘Depth’ parameter.

    Reply

Share your point of view!