Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✨ConvertFrom-JsonAsHashtable✨

简体中文 | Powershell Gallery | GitHub | Gitee | GitCode

license version PowerShell Gallery code size repo size created


Star ⭐️ or Donate 💰 if you like it!

Introduce

JSON to Hashtable Conversion for Windows PowerShell 5+, similar to ConvertFrom-Json -AsHashtable in PowerShell 7+.

  • PowerShell 7+: Directly delegates to the native ConvertFrom-Json -AsHashtable.
  • PowerShell 5+: Uses a hand-written iterative JSON parser.

Install

Usage

$jsonString = '{
       "key1": "value1",
       "key2": {
           "subKey1": "subValue1",
           "subKey2": ["item1", "item2"]
       },
       "key3": [
           {"nestedKey1": "nestedValue1"},
           {"nestedKey2": "nestedValue2"}
       ]
   }'

$jsonString | ConvertFrom-JsonAsHashtable

License

MIT © abgox

About

JSON to Hashtable Conversion for Windows PowerShell 5+, similar to 'ConvertFrom-Json -AsHashtable' in PowerShell 7+.

Topics

Resources

Code of conduct

Stars

1 star

Watchers

1 watching

Forks

Sponsor this project

Contributors

Languages