我正在使用 Flurl 库调用 Web 服务,该服务返回 JSON
{"data":{"charges":[{"code":30200757,"reference":"","dueDate":"18/12/2018","checkoutUrl":"https://sandbox.boletobancario.com/boletofacil/checkout/C238E9C42A372D25FDE214AE3CF4CB80FD37E71040CBCF50","link":"https://sandbox.boletobancario.com/boletofacil/charge/boleto.pdf?token=366800:m:3ea89b5c6579ec18fcd8ad37f07d178f66d0b0eb45d5e67b884894a8422f23c2","installmentLink":"https://sandbox.boletobancario.com/boletofacil/charge/boleto.pdf?token=30200757:10829e9ba07ea6262c2a2824b36c62e7c5782a43c855a1004071d653dee39af0","payNumber":"BOLETO TESTE - Não é válido para pagamento","billetDetails":{"bankAccount":"0655/46480-8","ourNumber":"176/30200757-1","barcodeNumber":"34192774200000123001763020075710655464808000","portfolio":"176"}}]},"success":true}
这是我的 F# 代码:
let c = "https://sandbox.boletobancario.com/boletofacil/integration/api/v1/"
.AppendPathSegment("issue-charge")
.SetQueryParams(map)
.GetJsonAsync()
c.Wait()
let j = c.Result
let success = j?success
我检查了变量j包含一个 obj ("System.Dynamic.ExpandoObject")
例如,如何访问变量 j 中此 obj 的成功值?以及如何访问数据?