【问题标题】:Newtonsoft.Json: Self referencing loop detected for property for azure functionNewtonsoft.Json:为天蓝色函数的属性检测到自引用循环
【发布时间】:2021-12-26 04:19:55
【问题描述】:

我收到此错误: Newtonsoft.Json:在我运行 azure 函数时检测到属性的自引用循环,但我已经使用此代码添加了 startupFile

  public override void Configure(IFunctionsHostBuilder builder)
        {
            JsonConvert.DefaultSettings = () => new JsonSerializerSettings
            {
                Formatting = Formatting.Indented,
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            };
        
        }

【问题讨论】:

    标签: azure-functions azure-http-trigger


    【解决方案1】:

    我通过使用[IgnoreDataMember] 属性装饰属性解决了这个问题。

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 1970-01-01
    • 2018-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-11
    • 2016-11-27
    • 1970-01-01
    • 2020-03-04
    • 2021-07-31
    相关资源
    最近更新 更多