I am creating service on ASP .NET Core 2.1 and I cant get Json response with class attribute.
This is ShopItem Class:
 [JsonObject(MemberSerialization.OptIn)]
public class ShopItem
{
    [JsonProperty]
    public int id { get; set; }
    [JsonProperty]
    public String ItemName { get; set; }
    [JsonProperty]
    public string ItemQty { get; set; }
    [JsonProperty]
    public int ListId { get; set; }
    public ShopItem()
    {
    }
    [JsonConstructor]
    public ShopItem(int _id, String _ItemName, string _ItemQty, int _ListId)
    {
        id = _id;
        ItemName = _ItemName;
        ItemQty = _ItemQty;
        ListId = _ListId;
    }
}
This is ShopList class that contains list of shop items
[JsonObject(MemberSerialization.OptIn)]
public class ShopList
{
    [JsonProperty]
    public int id { get; set; }
    [JsonProperty]
    public String ListName { get; set; }
    [JsonProperty]
    public string Store { get; set; }
    [JsonProperty]
    public int UserId { get; set; }
    [JsonProperty]
    public List<ShopItem> list = new List<ShopItem>();
    public ShopList()
    {
    }
    public ShopList(int _id, String _ListName, string _Store, int _UserId)
    {
        id = _id;
        ListName = _ListName;
        Store = _Store;
        UserId = _UserId;
    }
}
This is my controler class
[Route("api/[action]")]
public class ShopListsRetriveControler : Controller
{
    //get all Shoping lists
    // GET: api/<controller>
    [ActionName("GetAllShopLst")]
    [HttpGet]
    public List<ShopList> getAllLists()
    {
        return DAL._GetAllShopLst();
        //return Ok(DAL._GetAllShopLst());
    }
    [HttpGet("getAllListsRecords")]
    public JsonResult getAllListsRecords()
    {
        JsonResult jr = Json(DAL._GetAllShopLst());
        Newtonsoft.Json.JsonSerializerSettings jsonSerializerSettings = new Newtonsoft.Json.JsonSerializerSettings();
        jsonSerializerSettings.TypeNameHandling = Newtonsoft.Json.TypeNameHandling.All;
        return Json(DAL._GetAllShopLst(),jsonSerializerSettings);
    }
}
Result of my code is:
{
"list":    [
        {
     "id": 1,
     "itemName": "Stvar1",
     "itemQty": "1 kom",
     "listId": 1
  },
        {
     "id": 2,
     "itemName": "Stvar2",
     "itemQty": "2 kom",
     "listId": 1
  },
        {
     "id": 3,
     "itemName": "Stvar3",
     "itemQty": "3 kom",
     "listId": 1
  },
]
"id": 1,
"listName": "Lista1",
"store": "          ",
"userId": 0
} 
How can I get type names in response. I google it a lot but i cant find whats missing.
