2

I have a standard .NET Core API Controller that returns JSON.

All works as designed but with larger data sets the response is being truncated.

I cannot work out (or find on Stackoverflow or elsewhere) how to increase the limit - presuming this is the cause.

Can someone point me in the right direction please?

Mark Chidlow
  • 1,432
  • 2
  • 24
  • 43

1 Answers1

1

I had a similar issue and what seemed to fix it was setting the 'ReferenceLoopHandling' JSON setting:

public void ConfigureServices(IServiceCollection services)
{
        services.AddMvc().AddJsonOptions(options => {
            options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
        });
 ...
}