Map an object by JSON

0

I am mapping an object from my controller, I sent it through the GET method by JSON. The object generates it well, check that it brings data. The communication is correct, it works well if I send an empty object or a text, the problem is when I send it to JSON. I throw error, when I want to see the description of the object it says "[Object object]" and when I want to see its values "Undefined".

What could be the error? I'm using Model ViewModel that does not have that class, could that be the problem? What strikes me is that I worked perfectly sending data, but when I change the implementation of the database (use Entity Framework) now it returns error instead of mapping it correctly.

    
asked by seojedaperez 16.05.2017 в 14:30
source

1 answer

0

I discovered what it was: as I had used entity framework I marked the dependencies as attributes of the model, then, when wanting to create a new object of that model, I threw error because I could not find the dependencies in json. Equal for the doubts install Newton Json

    
answered by 16.05.2017 / 15:33
source