View Single Post
  #2  
Old 10-29-2020, 03:25 AM
Robert Hadfield's Avatar
Robert Hadfield Robert Hadfield is offline
 
Join Date: Oct 2020
Posts: 2
Default

Funny how you can spend days on something & then work it out hours after posting on a forum.
ConvertFrom-Json has a default depth of 1024
ConvertTo-Json has a default depth of only 2!
Adding -Depth 3 to the end of my ConvertTo-Json command has fixed my problem.

Code:
$myJSON = ConvertTo-Json $myproduct -compress -Depth 3
Wondering then, how deep do other Ecwid JSON objects go?

Last edited by Robert Hadfield; 10-29-2020 at 03:29 AM.