Hey All,
I’m trying to Convert a file from Json to a PS Object. I can run Get-Content command and load the json file into a variable. I can then execute that variable and the json file is returned accurately to the screen.
My issue is that when I run $variable | ConvertFrom-Json it returns the following:
data
@{databaseTablesConnection=}
I’ve tried messing around with some of the parameters of the ConvertFrom-Json command such as -depth and it does not make a difference. Shouldn’t PowerShell be able to parse this json file and load it as a PS object?
I’ve given an example of the Json file below.
Thanks!
{
"data": {
"databaseTablesConnection": {
"nodes": [
{
"id": "xxxx",
"luid": "xxxx",
"vizportalId": "xxx",
"name": "'xxxx'",
"fullName": "['xxxx']",
"connectionType": "xxxx",
"description": "",
"isCertified": xxx,
"certifier": null,
"certificationNote": "",
"isEmbedded": true,
"schema": "",
"contact": null,
"database": {
"luid": "xxxx",
"name": "xxxxx"
},
"dataQualityWarning": null
},
{
"id": "xxxx",
"luid": "xxxx",
"vizportalId": "xxx",
"name": "'xxxx'",
"fullName": "['xxxx']",
"connectionType": "xxxx",
"description": "",
"isCertified": xxx,
"certifier": null,
"certificationNote": "",
"isEmbedded": true,
"schema": "",
"contact": null,
"database": {
"luid": "xxxx",
"name": "xxxxx"
},
"dataQualityWarning": null
},
{
"id": "xxxx",
"luid": "xxxx",
"vizportalId": "xxx",
"name": "'xxxx'",
"fullName": "['xxxx']",
"connectionType": "xxxx",
"description": "",
"isCertified": xxx,
"certifier": null,
"certificationNote": "",
"isEmbedded": true,
"schema": "",
"contact": null,
"database": {
"luid": "xxxx",
"name": "xxxxx"
},
"dataQualityWarning": null
}
]
}
}
}