I am trying to create custom Api in magneto2. Its a POST CALL, in which i am trying to send associative array like below,
{
"data": {
"testData": {
"title": "Test 01",
"place": {
"key": "value"
}
}
}
}
For the above format i am giving the param annotation as string[]
. Its working If i didn't pass place
data in it. But if i am passing place
data its throwing error like below,
Array to string conversion
Actual problem is i am not able to pass associative array in request param. Can anyone please help me on this?
I tried by creating an custom object type also. In that too i can give string[]
type only. So i cannot add more and more json data in it.