guard let jsonData = try? jsonEncoder.encode(userDTO),
let dictionary = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: Any] else
{
return nil
}
let updatedDictionary = updateNode(node: dictionary, value: value, keyPath: keyPath, operation: operation)
我也尝试过
.mutableLeaves
,没有任何运气。
一些嵌套在结构深处的键值对没有转换,为什么?