When adding ImageModel to a view that is displays using react. I get a self referecing loop error when —>payload: @Html.Json(Model).
I tried to config the HttpConfiguration config with this:
You can add [JsonIgnore] to GetUrlToImage property to fix the error. However, I think you should create your own model for this purpose, cause ImageModel is not designed for using in React, as you can see, it does not contain the Url to the image, but the delegate to get the Url.