Skip to content

Instantly share code, notes, and snippets.

@lantrix
Last active January 27, 2016 16:22
Show Gist options
  • Select an option

  • Save lantrix/8cb6d97a3ba508c1ad47 to your computer and use it in GitHub Desktop.

Select an option

Save lantrix/8cb6d97a3ba508c1ad47 to your computer and use it in GitHub Desktop.
Deserialise JSON object larger than 2MB with Powershell
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions")
$json = (New-Object -TypeName System.Web.Script.Serialization.JavaScriptSerializer `
-Property @{MaxJsonLength=67108864}).DeserializeObject($(Get-Content -Raw 'myfile.json'))
@flyingsriracha
Copy link

hey is there anyways to turn this serialized json into CSV? the result seem a bit dirty. I have 10MB json output file and need to parse it to csv. so far your method worked out as to serialize it. any help is super helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment