You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See #3705 as it is essentially the same issue, just in this case Invoke-RestMethod spits out a string instead of an object simply due to the result containing multiple variations of the same spelling (but different spelling casings)
Expected behavior
Typical API results from Invoke-RestMethod, objects, not strings.
Actual behavior
Invoke-RestMethod returns a string that is not converted from JSON, even though the output is indeed valid JSON.
Error details
ConvertFrom-JSON : Cannot convert the JSON string because a dictionary that was converted from the string contains the duplicated keys <Key> and <KEY>. Please use the -AsHashTable switch instead.Using -AsHashTable does work, but this functionality should be integrated with Invoke-RestMethod to avoid entirely.
Environment data
Name Value
---------
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Steps to reproduce
See #3705 as it is essentially the same issue, just in this case Invoke-RestMethod spits out a string instead of an object simply due to the result containing multiple variations of the same spelling (but different spelling casings)
Expected behavior
Typical API results from Invoke-RestMethod, objects, not strings.
Actual behavior
Invoke-RestMethod returns a string that is not converted from JSON, even though the output is indeed valid JSON.
Error details
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: