Json values in New-UDAutocompleteOption #4188
Labels
bug
Something isn't working
PowerShell Universal
Issue relates to PowerShell Universal.
requires triage
Issue has not yet been verified by the development team.
v5
Version 5 issue.
Description of Issue
https://forums.ironmansoftware.com/t/json-object-oddities-with-new-udautocompleteoption/11385
I have a function that fetches data, and constructs a dropdown using
New-UDAutocompleteOption
, however, if the-Value
parameter contains json it throws an error.The following code works as expected (_notice the underscore in the ConvertTo-Json string):
If i remove the underscore and do
[string]$Value = "$($_ | ConvertTo-Json -Compress)"
i get an error instead.As there are obvious and simple workarounds for now I prioritize this as low, but it seems to me this would be an unexpected behaviour..
Version
5.0.7 - 5.1.2
Severity
Low
Hosting Method
IIS
Operating System
Windows
Database
SQLite
Licensed
Yes
Features
No response
Additional Environment data
No response
Screenshots/Animations
No response
The text was updated successfully, but these errors were encountered: