0

I convert the Json file of Chrome Bookmarks to edit them with powershell.

This is the object in powershell

The problem, it's that i want to convert it, to Json again, but it doesn't export the childrens, and put them on blank, what will be the best solution to this?

This is only a part of the code where i convert it to object from Json. Is there another way to do it? Im using Powershell version 5.

#Converts and read the Json
$BkmrkJson = Get-Content $GoogleBkmrk | ConvertFrom-Json
    
Kevin M.
  • 11
  • 4
  • 3
    Can you show us the code you used to convert the JSON into a PowerShell object? – Bender the Greatest Jun 03 '22 at 19:13
  • @BendertheGreatest, i just update my question, but for some reason, they close my question. – Kevin M. Jun 03 '22 at 20:29
  • 1
    See if the following helps: Unfortunately, `ConvertTo-Json` has a default recursion depth of `2`, causing more deeply nested objects to be _truncated_ (cut off and represented by the result of calling `.ToString()` on them); in v7.1+ you'll at least get a _warning_ when that happens. Use the `-Depth` parameter with a sufficiently high number, as shown in the [linked post](https://stackoverflow.com/q/53583677/45375). – mklement0 Jun 03 '22 at 20:42
  • 1
    A note re potential reopening: Kevin's [follow-up question](https://stackoverflow.com/q/72496105/45375) implies that https://stackoverflow.com/q/53583677/45375 indeed answers _this_ question, which should therefore be closed as a duplicate instead of getting reopened. – mklement0 Jun 04 '22 at 02:52

0 Answers0