Thoth.Json 得到结果

Thoth.Json get result

应该很简单。

我用 Thoth.Json.Net

解析了一些 JSON
let children = Decode.Auto.fromString<floorplan_table>(parentTable.mergedchildren)

哪个 returns 结果

Result<floorplan_table, string>

我如何实际访问 floorplan_table 而它是 key/values?

这将使您能够访问 Result 中的 floorplan_table:

match children with
    | Ok floorplan -> doSomethingWith floorplan
    | Error msg -> handleError msg