pleroma: add JsonConstructor attribs
This commit is contained in:
parent
e5273860a6
commit
02ddd4c918
10 changed files with 16 additions and 0 deletions
|
@ -11,6 +11,11 @@ public class ASObject
|
|||
[JsonPropertyName("id")]
|
||||
public string ID { get; set; } = null!;
|
||||
|
||||
[JsonConstructor()]
|
||||
internal ASObject()
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString() => ID;
|
||||
|
||||
public override bool Equals(object? obj) => Equals(obj as ASObject);
|
||||
|
|
|
@ -53,6 +53,7 @@ public class Account : ASObject
|
|||
}
|
||||
}
|
||||
|
||||
[JsonConstructor()]
|
||||
internal Account()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ public class AccountField
|
|||
|
||||
public DateTime? VerifiedAt { get; set; }
|
||||
|
||||
[JsonConstructor()]
|
||||
internal AccountField()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ public class Attachment
|
|||
[JsonPropertyName("url")]
|
||||
public string URL { get; set; } = null!;
|
||||
|
||||
[JsonConstructor()]
|
||||
internal Attachment()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ public class Context
|
|||
[JsonPropertyName("descendants")]
|
||||
public Status[] Descendants { get; set; } = null!;
|
||||
|
||||
[JsonConstructor()]
|
||||
internal Context()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ public class Hashtag
|
|||
[JsonPropertyName("url")]
|
||||
public string URL { get; set; } = null!;
|
||||
|
||||
[JsonConstructor()]
|
||||
internal Hashtag()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ public class Mention
|
|||
[JsonPropertyName("username")]
|
||||
public string Username { get; set; } = null!;
|
||||
|
||||
[JsonConstructor()]
|
||||
internal Mention()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ public class Relationship
|
|||
[JsonPropertyName("subscribing")]
|
||||
public bool Subscribing { get; set; }
|
||||
|
||||
[JsonConstructor()]
|
||||
internal Relationship()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ public class SearchResults
|
|||
[JsonPropertyName("statuses")]
|
||||
public Status[]? Statuses { get; set; }
|
||||
|
||||
[JsonConstructor()]
|
||||
internal SearchResults()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -140,6 +140,7 @@ public class Status : ASObject
|
|||
[JsonIgnore]
|
||||
public string Content => Pleroma?.Content?.Plain ?? HtmlContent;
|
||||
|
||||
[JsonConstructor()]
|
||||
internal Status()
|
||||
{
|
||||
}
|
||||
|
@ -170,6 +171,7 @@ public class PleromaStatusData
|
|||
[JsonPropertyName("quote_id")]
|
||||
public string? QuoteID { get; set; }
|
||||
|
||||
[JsonConstructor()]
|
||||
internal PleromaStatusData()
|
||||
{
|
||||
}
|
||||
|
@ -180,6 +182,7 @@ public class PleromaStatusContent
|
|||
[JsonPropertyName("text/plain")]
|
||||
public string Plain { get; set; } = null!;
|
||||
|
||||
[JsonConstructor()]
|
||||
internal PleromaStatusContent()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue