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. Win10 bug report

    in Windows 10 Drivers and Hardware
    Win10 bug report: Greetings! In case of using multiple desktops on your OS, my laptop can't decide where to address play/pause function button (FN+function_key, in my case F10). Sometimes it's applied on WMP, sometimes on last opened instance of YouTube inside of a Chrome browser. Where to...
  3. 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 * |...
  4. Powershell bug reporting

    in Windows 10 Network and Sharing
    Powershell bug reporting: Hi - unfortunately feedback hub is disabled at my work so I can't report this directly, but if someone can report if for me? Consider the following really simple code: Try { Copy-Item -Path '\\server\g$\thisfolder\thisfiledoesntexist.ini' -Destination 'c:\temp'...
  5. what do I do to fix JSON formatting error

    in Windows 10 Installation and Upgrade
    what do I do to fix JSON formatting error: I got an error message that my JSON formatting wasn't right. What do I do tsssso fix it? https://answers.microsoft.com/en-us/windows/forum/all/what-do-i-do-to-fix-json-formatting-error/3c4adf3f-9550-4615-a774-2ec19e7d14e7
  6. JSON FILES

    in Windows 10 Network and Sharing
    JSON FILES: Hey, so I accidentally made my .json files to always open it with notepad. Now, I don't know how to restore it in its original state. Anyone can help? Also, I want the .json file to be a white blank icon again and with the command "open with..." to pop up....
  7. UI bug report

    in Windows 10 Customization
    UI bug report: My windows runs at resolution of 1920 x 1080 with "text, apps and other items" at 125% and orientation as landscape. After running any fullscreen application in other resolutions (tested with 1366x768 and 1280x960) than the native the small view that shows hidden apps does...
  8. How to report bugs in apps in the windows store?

    in Microsoft Windows 10 Store
    How to report bugs in apps in the windows store?: I have the twitter app that was installed from the windows store and it's got a few bugs. How do I report the bugs? https://answers.microsoft.com/en-us/windows/forum/all/how-to-report-bugs-in-apps-in-the-windows-store/a862ca9a-77ec-4c2b-bdd0-b6f078c3b5d1"
  9. How do I report a bug in my user interface for windows 10

    in Windows 10 Customization
    How do I report a bug in my user interface for windows 10: This morning when I came down to my computer, my desktop had huge icons all over it and my mouse sensitivity was ramped up so high that the mouse cursor was moving all around the screen when I was not even touching it. There are apparently ways to change the settings back,...
  10. Bug Reporting

    in Windows 10 Support
    Bug Reporting: I Just received this Email from Canonical on a bug I reported awhile back and subscribed to and it's a confirmation that the crash was related to a bug and not my system or something I did. Wouldn't it be nice if Microsoft had this too? I mean does "check for solutions"...