public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { var source = (ClaimsIdentity)value; var target = new ClaimsIdentityLite(source.Claims.Select(claim => new ClaimLite { Type = claim.Type, Value = claim.Value }), source.AuthenticationType); serializer.Serialize(writer, target); }
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { var source = (ServiceUser)value; var target = new ClaimsIdentityLite() { Claims = source.Claims.Select(claim => new ClaimLite(claim.Type, claim.Value)).ToList() }; serializer.Serialize(writer, target); }