Я получаю JSON из запроса на получение HttpClient. В результате происходит десериализация каждого свойства, кроме Guid и Datetime. свойства Guid разбираются как {System.Guid} , а дата разбирается как {System.DateTime} .
Веб-запрос:
var json = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject<ICollection<UserEntity>>(json);
Json:
[{"Id":"5aee0750-6cd9-4d20-9fe9-1f7e23a4520b","MemberShipUserID":12346,
"Username":"Joshr","EmpName":"Josh","Password":"test123",
"Email":"nanidotnetdev@gmail.com","Phone":"1234567899",
"IsActive":true,"IsContractor":true,"RoleID":null,"ProfilePhotoID":null,
"CreatedDate":"2018-08-08T01:15:12.73",
"CreatedBy":"e4c6d172-3d14-4539-9fee-306b081dc3db","UpdatedDate":null,
"UpdatedBy":null,"LastLoginDate":null}]
UserEntity:
public class UserEntity
{
public Guid Id { get; set; }
public int? MemberShipUserID { get; set; }
public string Username { get; set; }
public string EmpName { get; set; }
public string Password { get; set; }
public string Email { get; set; }
public string Phone { get; set; }
public bool IsActive { get; set; }
public bool IsContractor { get; set; }
public Guid? RoleID { get; set; }
public string ProfilePhotoID { get; set; }
public DateTime CreatedDate { get; set; }
public Guid CreatedBy { get; set; }
public DateTime? UpdatedDate { get; set; }
public Guid? UpdatedBy { get; set; }
public DateTime? LastLoginDate { get; set; }
}
Мне не хватает каких-либо объявлений о недвижимости здесь? Пожалуйста, уточните.
Спасибо