Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Things to check
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
While keys are strings, the mapped type of objects and the element type of arrays is the aforementioned type <<ref_value>> which can hold any JSON element, as seen in the previous assignments. Instead of building the JSON document using a series of function calls, we can build it in one statement using an initializer list:尽管键是字符串,但对象的映射类型和数组的元素类型均为前述的 <<ref_value>> 类型,它可以保存任意 JSON 元素,如前文赋值所示。除了通过一系列函数调用构建 JSON 文档外,我们还可以使用初始化列表在一条语句中完成构建:</ref_value>