以下是当前返回并在 Swagger UI 中显示的示例 JSON 字符串的格式。有没有更好的方法来返回格式化的 JSON 字符串并在 UI 上显示而无需显式的字符串替换功能。
"IdentifierDetails": "{\"Id\":\"123456\",\"IdentifiedDate\":\"04/20/2020 1:24:35 PM\",\"Specification\":{\"City\":\"NEWYORK\",\"Country\":\"US\",\"FirstName\":\"Thomas\",\"LastName\":\"Paul\",\"Company\":\"AT&T\",\"InsuranceID\":\"1\2020\4566-7623245\"}}"
预期的:
"IdentifierDetails": "{"Id":"123456","IdentifiedDate":"04/20/2020 1:24:35 PM","Specification":{"City":"NEWYORK","Country":"US","FirstName":"Thomas","LastName":"Paul","Company":"AT&T","InsuranceID":"1\2020\4566-7623245"}}"