Windows 10: How do I report a bug in Powewrshell? Convertto-JSON exception

Discus and support How do I report a bug in Powewrshell? Convertto-JSON exception in Windows 10 BSOD Crashes and Debugging to solve the problem; I think I have found a bug in PowerShell, but cant find a way to report it. Feedback hub seems to be broken Discontinued? When I try to use... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by sysadminSecurityGuy, Feb 1, 2020.

  1. How do I report a bug in Powewrshell? Convertto-JSON exception


    I think I have found a bug in PowerShell, but cant find a way to report it. Feedback hub seems to be broken Discontinued?

    When I try to use convertto-json using an object that is a class that is descended from another class, and one of the properties has been overridden to a different type, the convertto-json command throws an error. The almost identical convertto-xml does not suffer with this problem.

    EXAMPLE:


    class pet {

    [string] $breed

    [string[]] $owners # ARRAY OF STRINGS

    }


    class cat How do I report a bug in Powewrshell?  Convertto-JSON exception :pet {
    [string] $breed
    [string] $owners # CHANGE TO SINGLE STRING
    }

    #LOAD SOME DATA

    $FIDO = new-object pet
    $FIDO.breed = "bulldog"
    $FIDHow do I report a bug in Powewrshell?  Convertto-JSON exception o_Owners = "fred","harry"
    $Kitty = new-object cat
    $Kitty.breed = "moggie"
    $Kitty.owners = "jane,sue"

    $FIDO convertto-json # THIS WORKS AS EXPECTED
    {

    "breed": "bulldog",

    "owners": [

    "fred",

    "harry"

    ]

    }


    $kitty convertto-json # THIS DOESN'T WORK

    convertto-json : An item with the same key has already been added.

    At line:24 char:10

    + $kitty convertto-json

    + ~~~~~~~~~~~~~~

    + CategoryInfo : NotSpecified: : [ConvertTo-Json], ArgumentException

    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertToJsonCommand

    :)
     
    sysadminSecurityGuy, Feb 1, 2020
    #1
  2. Peer_Sam Win User

    bug in powershell module Convert*-Json

    Hi Edwin,



    We do have a dedicated support forum for programmers and developers. Since the command uses the ConvertTo-Json and ConvertFrom-Json cmdlets to convert a DateTime object from the Get-Date cmdlet to a JSON object then to a PSCustomObject, I would suggest
    to post your query on MSDN Forums.



    Regards,

    Peer Samie

    Microsoft Community-Forums
     
    Peer_Sam, Feb 1, 2020
    #2
  3. bug in powershell module Convert*-Json

    Hi all,

    The date property goes one day back when I convert it to Json and directly convert it back.

    Get-Date | Select-Object -Property *

    DateTime : monday 18 february 2019 09:45:59

    Date : 18-2-2019 00:00:00

    Get-Date | Select-Object -Property * | ConvertTo-Json | ConvertFrom-Json

    DateTime : monday 18 february 2019 09:45:59

    Date : 17-2-2019 23:00:00

    Looks like a bug to me.......
     
    EdwinSiebrasse, Feb 1, 2020
    #3
  4. DaveM121 Win User

    How do I report a bug in Powewrshell? Convertto-JSON exception

    JSON FILES

    Hi Acemere

    The steps above create a dummy exe file, which you point windows to open json files with, then you delete the dummy exe and restart, When you restart the dummy exe will not exist, so Windows will not know how to open json files and that file association will
    revert to unknown and the icon should be the default white icon . ..
     
    DaveM121, Feb 1, 2020
    #4
Thema:

How do I report a bug in Powewrshell? Convertto-JSON exception

Loading...
  1. How do I report a bug in Powewrshell? Convertto-JSON exception - Similar Threads - report bug Powewrshell

  2. How do I report a OS bug to Microsoft?

    in Windows 10 Gaming
    How do I report a OS bug to Microsoft?: I'm asking because I'm trying to bring light a security bug where after restart or shutdown, it doesn't bring up the login screen, instead already has you logged in. As for what happened before this bug, I had my system updated and only has one account on it. If additional...
  3. How do I report a OS bug to Microsoft?

    in Windows 10 Software and Apps
    How do I report a OS bug to Microsoft?: I'm asking because I'm trying to bring light a security bug where after restart or shutdown, it doesn't bring up the login screen, instead already has you logged in. As for what happened before this bug, I had my system updated and only has one account on it. If additional...
  4. How do I report a OS bug to Microsoft?

    in AntiVirus, Firewalls and System Security
    How do I report a OS bug to Microsoft?: I'm asking because I'm trying to bring light a security bug where after restart or shutdown, it doesn't bring up the login screen, instead already has you logged in. As for what happened before this bug, I had my system updated and only has one account on it. If additional...
  5. How do I report a bug in saved password monitor?

    in Windows 10 Gaming
    How do I report a bug in saved password monitor?: I get a popup that says: Your password for xxx is at risk. It displays my email address, a *** out password field and an icon to see the password. I click on the icon and get a popup from Edge asking for my Windows' password. I enter it and press OK. Both popups disappear...
  6. How do I report a bug in saved password monitor?

    in Windows 10 Network and Sharing
    How do I report a bug in saved password monitor?: I get a popup that says: Your password for xxx is at risk. It displays my email address, a *** out password field and an icon to see the password. I click on the icon and get a popup from Edge asking for my Windows' password. I enter it and press OK. Both popups disappear...
  7. How do I report a bug in saved password monitor?

    in Windows 10 Software and Apps
    How do I report a bug in saved password monitor?: I get a popup that says: Your password for xxx is at risk. It displays my email address, a *** out password field and an icon to see the password. I click on the icon and get a popup from Edge asking for my Windows' password. I enter it and press OK. Both popups disappear...
  8. how to report a bug?

    in Windows 10 BSOD Crashes and Debugging
    how to report a bug?: I want to report a bug i just updated and the screen keep resizing from 480 220 to the native resolution of 1920 by 1080 I have a dell G5 SE laptop and this problem was temporarily solved by disabling AMD RadeonTM Graphics in device manager. can someone plz explain this. G5...
  9. Where do I report Windows bugs?

    in Windows 10 Installation and Upgrade
    Where do I report Windows bugs?: Hi folks, just had a Windows update on my Surface Book 3 and since it updated the docking station has been on the blink which means everything that's plugged into it keeps turning off and on. Everything was peachy until the update had finished installing. Thank in advance...
  10. bug in powershell module Convert*-Json

    in Windows 10 BSOD Crashes and Debugging
    bug in powershell module Convert*-Json: Hi all, The date property goes one day back when I convert it to Json and directly convert it back. Get-Date | Select-Object -Property * DateTime : monday 18 february 2019 09:45:59 Date : 18-2-2019 00:00:00 Get-Date | Select-Object -Property * |...