Powershell 7 TEST-JSON

Welcome Forums General PowerShell Q&A Powershell 7 TEST-JSON

Viewing 1 reply thread
  • Author
    • #251993
      Topics: 1
      Replies: 0
      Points: 11
      Rank: Member

      The Test-Json module does not validate a valid Json.
      Take a look at this Json, it’s validated from jsonlint but in powershell I get Cannot parse the JSON

      • This topic was modified 4 months, 3 weeks ago by kvprasoon. Reason: Code formatting and moving to proper forum
    • #252146
      Topics: 17
      Replies: 1951
      Points: 3,985
      Helping Hand
      Rank: Community Hero

      Not familiar with Test-Json, but an option would be to just attempt a parse like this:

      This uses the built-in JSON parser to attempt to create a valid object in Powershell. If you want to use Test-Json, you’ll have to reach out to the module creator and work with them on any bug.

Viewing 1 reply thread
  • The topic ‘Powershell 7 TEST-JSON’ is closed to new replies.