0

I get this error : Newtonsoft.Json: Self referencing loop detected for property when I run my azure function but i have already added a startupFile with the this code

  public override void Configure(IFunctionsHostBuilder builder)
        {
            JsonConvert.DefaultSettings = () => new JsonSerializerSettings
            {
                Formatting = Formatting.Indented,
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            };
        
        }
johnson dubula
  • 31
  • 1
  • 1
  • 7

1 Answers1

0

I solved this by decorating the property with the [IgnoreDataMember] attribute.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
johnson dubula
  • 31
  • 1
  • 1
  • 7
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 15 '21 at 00:16