Last active
February 11, 2017 13:40
-
-
Save torgro/42e8956d30538ac50ca7b86bea5a6023 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Object = [pscustomobject]@{ | |
Name = "Tore" | |
SpecialNumber = 255 | |
StartDate = (Get-Date) | |
EndDate = (Get-Date).AddYears(3) | |
Temperature = 23.11 | |
IsPowershell = $true | |
} | |
$CliXMLlength = [System.Management.Automation.PSSerializer]::Serialize($Object).Length | |
$JSONlength = ($Object | ConvertTo-Json -Compress).Length | |
$HashData = ($Object | ConvertTo-Hashtable | ConvertTo-HashString).Length | |
[PSCustomObject]@{ | |
XML = $CliXMLlength | |
JSON = $JSONlength | |
HashData = $HashData | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment