我看了很多示例,但我没有找到一种方法来指定一个属性,该属性的值是一个以字符串为值的JSON对象。我有一个这样的对象:
{
id: 123,
title: "I am a title",
dynamic_attributes: {
"key1": "value1",
"key2": "value2",
"keyN": "valueN",
}
}我正在为如何指定dynamic_attributes而苦苦挣扎,因为键是动态的,在编写文档时是未知的。它基本上是一个JSON对象,应该只将字符串作为值。
有没有办法在MSON中做到这一点?
发布于 2017-05-15 18:33:10
以下是MSON:
# Entity (object)
## Properties
+ id: `12` (integer,required) - The ID of this entity.
+ dynamic_attributes (AttributeValue) - Map of custom attribute values.
# AttributeValue (object)
## Properties
+ *key1* (string) - Value for Key 1
+ *key2* (string) - Value for Key 2https://stackoverflow.com/questions/43974718
复制相似问题