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

Invalid JSON parsed without exception #16939

Open
5 tasks done
majkinetor opened this issue Mar 1, 2022 · 1 comment
Open
5 tasks done

Invalid JSON parsed without exception #16939

majkinetor opened this issue Mar 1, 2022 · 1 comment
Labels
Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Needs-Triage The issue is new and needs to be triaged by a work group. WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module

Comments

@majkinetor
Copy link

majkinetor commented Mar 1, 2022

Prerequisites

Steps to reproduce

$s = '
{
    "foo": "bar",
    "baz": ,
    "foo2": 10
}'
ConvertFrom-Json $s

Expected behavior

Something like jslint or at least throwing.

Error: Parse error on line 4:
...: "bar",    "baz": ,    "foo2": 10}
----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got ','

Actual behavior

pwsh output:

foo baz foo2
--- --- ----
bar       10

powershell output

ConvertFrom-Json : Invalid JSON primitive: .

Error details

No response

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Microsoft Windows 10.0.19044
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

@majkinetor majkinetor added the Needs-Triage The issue is new and needs to be triaged by a work group. label Mar 1, 2022
@iSazonov iSazonov added Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module labels Mar 2, 2022
@microsoft-github-policy-service microsoft-github-policy-service bot added the Resolution-No Activity Issue has had no activity for 6 months or more label Nov 15, 2023
@majkinetor
Copy link
Author

Its still a bug on PowerShell 7.3.8.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Resolution-No Activity Issue has had no activity for 6 months or more label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Needs-Triage The issue is new and needs to be triaged by a work group. WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module
Projects
None yet
Development

No branches or pull requests

2 participants