0
有嵌套路徑的線像鑰匙:變換地圖路徑 - >值成樹狀圖
Map(
"manufacturer" -> "Magnavox",
"processor.address-space" -> 8,
"gpu.processor.address-space" -> 8,
"processor.speed" -> 150
)
怎麼可能是一個地道的斯卡拉基於路徑分組的值,把它變成:
Map(
"gpu" -> Map(
"processor" -> Map("address-space" -> 8)
),
"processor" -> Map(
"speed" -> 150,
"address-space" -> 8
),
"manufacturer" -> "Magnavox"
)
注意:所有鍵葉路徑,所以,不gpu -> "something"
被允許作爲在這種情況下的輸入。