【问题标题】:Azure Functions DurableFunction Status output is Pascal casedAzure Functions Durable Function Status 输出为 Pascal 情况
【发布时间】:2021-09-01 18:47:18
【问题描述】:

我正在使用返回 CreateCheckStatusResponse 的 Azure Durable Functions Starter。客户端轮询提供的 URL,直到 runtimeStatus 为“已完成”并使用输出。在我的其他 .netcore 应用程序中,返回 JSON 的端点是驼峰式的;但是,此 Output 属性在 Pascal 中有它 - 如何在我的函数应用程序中更改此行为?

【问题讨论】:

  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: azure-functions azure-durable-functions


【解决方案1】:

您可以使用“Newtonsoft.Json.Serialization”库将函数应用的输出从帕斯卡大小写转换为骆驼大小写。

这里是关于将串行对象转换为camel case in http trigger functions的参考线程

【讨论】:

  • 我的情况略有不同,因为我使用的是CreateCheckStatusResponse,它没有使用该配置的过载。但是,其他回复之一 (stackoverflow.com/a/53681329/16040368) 正是我所需要的。
猜你喜欢
  • 2020-01-04
  • 2022-06-10
  • 1970-01-01
  • 1970-01-01
  • 2020-08-25
  • 2021-10-27
  • 2021-01-07
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多