-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from Newtonsoft.Json to System.Text.Json
- Loading branch information
Showing
7 changed files
with
108 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace v2rayN.Mode | ||
{ | ||
public class GitHubReleaseAsset | ||
{ | ||
[JsonProperty("url")] public string Url { get; set; } | ||
[JsonPropertyName("url")] public string Url { get; set; } | ||
|
||
[JsonProperty("id")] public int Id { get; set; } | ||
[JsonPropertyName("id")] public int Id { get; set; } | ||
|
||
[JsonProperty("node_id")] public string NodeId { get; set; } | ||
[JsonPropertyName("node_id")] public string NodeId { get; set; } | ||
|
||
[JsonProperty("name")] public string Name { get; set; } | ||
[JsonPropertyName("name")] public string Name { get; set; } | ||
|
||
[JsonProperty("label")] public object Label { get; set; } | ||
[JsonPropertyName("label")] public object Label { get; set; } | ||
|
||
[JsonProperty("content_type")] public string ContentType { get; set; } | ||
[JsonPropertyName("content_type")] public string ContentType { get; set; } | ||
|
||
[JsonProperty("state")] public string State { get; set; } | ||
[JsonPropertyName("state")] public string State { get; set; } | ||
|
||
[JsonProperty("size")] public int Size { get; set; } | ||
[JsonPropertyName("size")] public int Size { get; set; } | ||
|
||
[JsonProperty("download_count")] public int DownloadCount { get; set; } | ||
[JsonPropertyName("download_count")] public int DownloadCount { get; set; } | ||
|
||
[JsonProperty("created_at")] public DateTime CreatedAt { get; set; } | ||
[JsonPropertyName("created_at")] public DateTime CreatedAt { get; set; } | ||
|
||
[JsonProperty("updated_at")] public DateTime UpdatedAt { get; set; } | ||
[JsonPropertyName("updated_at")] public DateTime UpdatedAt { get; set; } | ||
|
||
[JsonProperty("browser_download_url")] public string BrowserDownloadUrl { get; set; } | ||
[JsonPropertyName("browser_download_url")] public string BrowserDownloadUrl { get; set; } | ||
} | ||
|
||
public class GitHubRelease | ||
{ | ||
[JsonProperty("url")] public string Url { get; set; } | ||
[JsonPropertyName("url")] public string Url { get; set; } | ||
|
||
[JsonProperty("assets_url")] public string AssetsUrl { get; set; } | ||
[JsonPropertyName("assets_url")] public string AssetsUrl { get; set; } | ||
|
||
[JsonProperty("upload_url")] public string UploadUrl { get; set; } | ||
[JsonPropertyName("upload_url")] public string UploadUrl { get; set; } | ||
|
||
[JsonProperty("html_url")] public string HtmlUrl { get; set; } | ||
[JsonPropertyName("html_url")] public string HtmlUrl { get; set; } | ||
|
||
[JsonProperty("id")] public int Id { get; set; } | ||
[JsonPropertyName("id")] public int Id { get; set; } | ||
|
||
[JsonProperty("node_id")] public string NodeId { get; set; } | ||
[JsonPropertyName("node_id")] public string NodeId { get; set; } | ||
|
||
[JsonProperty("tag_name")] public string TagName { get; set; } | ||
[JsonPropertyName("tag_name")] public string TagName { get; set; } | ||
|
||
[JsonProperty("target_commitish")] public string TargetCommitish { get; set; } | ||
[JsonPropertyName("target_commitish")] public string TargetCommitish { get; set; } | ||
|
||
[JsonProperty("name")] public string Name { get; set; } | ||
[JsonPropertyName("name")] public string Name { get; set; } | ||
|
||
[JsonProperty("draft")] public bool Draft { get; set; } | ||
[JsonPropertyName("draft")] public bool Draft { get; set; } | ||
|
||
[JsonProperty("prerelease")] public bool Prerelease { get; set; } | ||
[JsonPropertyName("prerelease")] public bool Prerelease { get; set; } | ||
|
||
[JsonProperty("created_at")] public DateTime CreatedAt { get; set; } | ||
[JsonPropertyName("created_at")] public DateTime CreatedAt { get; set; } | ||
|
||
[JsonProperty("published_at")] public DateTime PublishedAt { get; set; } | ||
[JsonPropertyName("published_at")] public DateTime PublishedAt { get; set; } | ||
|
||
[JsonProperty("assets")] public List<GitHubReleaseAsset> Assets { get; set; } | ||
[JsonPropertyName("assets")] public List<GitHubReleaseAsset> Assets { get; set; } | ||
|
||
[JsonProperty("tarball_url")] public string TarballUrl { get; set; } | ||
[JsonPropertyName("tarball_url")] public string TarballUrl { get; set; } | ||
|
||
[JsonProperty("zipball_url")] public string ZipballUrl { get; set; } | ||
[JsonPropertyName("zipball_url")] public string ZipballUrl { get; set; } | ||
|
||
[JsonProperty("body")] public string Body { get; set; } | ||
[JsonPropertyName("body")] public string Body { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters