I'm calling API using postman, I'm sending dynamic properties using JObject as given below
I'm sending class data to API using JSON but which is ignoring the values of duplicate data
public class Details
{
public List<JObject> Mappings { get; set; }
// adding properties to jobject abd mappings
[JsonExtensionData]
public IDictionary<string, JToken> AdditionalProperties { get; set; }
}
I'm using below JSON in postman
{
"source": {
"details": "Sample Customer",
"compoet": "Sample Site",
"Name": "Sample Software",
"Version": "1.0.1",
"Creator": "Sample Company"
},
"Mappings":[
{
"data": Test.Name1",
"data": Test.Name23",
"newprop":"Account1",
}
{
"data": "Test.Name2",
"newprop":"Account2",
}
]
}
when I pass duplicate key API is taking second value "data": Test.Name23"
I want API should take both values from mapping can anyone help?
it's better don't do that, and this is my reason
you can pass "data" value as an array
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.