【发布时间】:2017-06-14 08:18:51
【问题描述】:
我想知道rest api在使用输入参数时是否可以执行以下操作:
假设我的 json 对象具有以下参数:
string name;
string adress;
hashmap<string,object> content;
以下是可以发送的示例:
{
"name": "AZ",
"adress": "US",
"content": {
"clients": [
{
"client_ref":"213",
"commands" : {
"subCommands": [
{
"num":"1",
"price":"10euro"
},
{
"num":"12,
"price":"10euro"
}
]
}
},
{
"client_ref":"213",
"commands" : {
"subCommands": [
{
"num":"1",
"price":"10euro"
},
{
"num":"12,
"price":"10euro"
}
]
}
}
]
}
}
问题是可以在对象本身可以有n个hashmap类型的子节点的地方构建hashmap吗?
(我使用球衣作为休息实现)
【问题讨论】:
-
你试过了吗?发生了什么?如果出现问题,请向我们展示代码并描述问题所在和位置。