Skip to content

ConvertFrom-Json fails to parse project.lock.json #1755

@SteveL-MSFT

Description

@SteveL-MSFT
$json = gc project.lock.json -Raw
ConvertFrom-Json $json

Expected: PowerShell should be able to parser the json data.
Actual: A useless error message which does not tell me what went wrong

ConvertFrom-Json : Cannot process argument because the value of argument "name" is not valid. Change the value of the
"name" argument and run the operation again.
At line:1 char:1
- ConvertFrom-Json $json
- ~~~~~~~~~~~~~~~~~~~~~~
  - CategoryInfo          : InvalidArgument: (:) [ConvertFrom-Json], PSArgumentException
  - FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.ConvertFromJsonCommand

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Cmdletsgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions