Using dot notation in a JSON property name (e.g. “payment.token”)
问题 I am working on a script that has to make an API request. Currently, the object to send to the API looks like this: var request = new { amount = new { currency = amount.Currency, value = amount.Amount }, additionalData = new AdditionalData { ApplePayToken = paymentToken } }; The issue is, the API expects the following format to receive the additionalData property: "additionalData":{ "payment.token": "some-token" } I'm using the following code to try to reformat the object above: internal