Is there a way to minify (remove all whitespace in this case) a JSON file to turn this
[
0.000005,
0,
0
],
[
219.740502,
0.003449,
4.177065
],
[
45.210918,
0.003365,
-16.008996
],
[
344.552785,
0.030213,
277.614965
],
to this using PowerShell
[0.000005,0,0],[219.740502,0.003449,4.177065],[45.210918,0.003365,-16.008996],[344.552785,0.030213,277.614965],
I have tried several online "minifiers" however the file contains over 100,000 arrays and basically broke all the online minifiers. Any ideas?
Just for your information when you manipulate PowerShell object and convert them to JSON (ConvertTo-Json
) you've got the -compress
param :
New-Object -TypeName PSCustomObject -Property @{Name="Hugot";GivenName="Victor"} | ConvertTo-Json -Compress
gives :
{"GivenName":"Victor","Name":"Hugot"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With