Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to JSON gives XML output. #9

Closed
coaksford opened this issue Aug 31, 2018 · 1 comment
Closed

Export to JSON gives XML output. #9

coaksford opened this issue Aug 31, 2018 · 1 comment

Comments

@coaksford
Copy link

Choosing options to export to JSON gives XML output.

The JSON object is a string which does not have a .Save() method, it looks like this line was copied from the XML option where the XML object does have a .Save() method, so I just copied this from the HTML function and it works correctly.

Replace line 4159 in Function Export-ADRJSON, originally:

(ConvertTo-JSON -InputObject $ADRObj).Save($ADFileName)

with:

ConvertTo-JSON -InputObject $ADRObj | Out-File -FilePath $ADFileName

This looks like it was just an oversight while copying and pasting the XML function, but the Export-ADRJSON function was actually never called from anywhere in the script.

Replace line 4316 in Function Export-ADR, originally:

Export-ADRXML -ADRObj $ADRObj -ADFileName $ADFileName

with:

Export-ADRJSON -ADRObj $ADRObj -ADFileName $ADFileName

@prashant3535
Copy link
Contributor

Thanks. Have pushed the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants