-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-AnsweredThe question is answered.The question is answered.WG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues
Milestone
Description
Steps to reproduce
'{"a": "first", "a": "last"}' | ConvertFrom-JsonExpected behavior
On the full powershell, i.e. v5.1 (windows)
a
-
last
Actual behavior
ConvertFrom-Json : Can not add property a to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.
At line:1 char:33
+ '{"a": "first", "a": "last"}' | ConvertFrom-Json
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.10032.0
PSEdition PowerShellCore
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 3.0.0.0
GitCommitId v6.0.0-alpha.7
CLRVersion
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1Metadata
Metadata
Assignees
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-AnsweredThe question is answered.The question is answered.WG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues