JSON
JavaScript Object Notation (JSON) is a lightweight format used to store and transport data.
JSON is like XML in some respects. It is intended to be both human- and machine-readable. Like XML, JSON is written in plain text.
JSON is a form of serialization. Data can be converted to and from a string that represents that data. Like a Hashtable, JSON-formatted objects are made up of key-value pairs, for example:
{
"key1": "value1",
"key2": "value2"
}
PowerShell 3 introduced the ConvertTo-Json
and ConvertFrom-Json
commands.
Newtonsoft JSON is native in PowerShell 7
PowerShell 7 (and PowerShell 6) use the JSON library from NewtonSoft to serialize and deserialize JSON content.
Advanced JSON serialization and deserialization are available using the classes in the Newtonsoft namespace. The capabilities are documented on the Newtonsoft website: https://www.newtonsoft.com/json/help/html/Introduction...