replace Newtonsoft.Json by System.Text.Json
This commit is contained in:
@ -29,8 +29,8 @@
|
|||||||
<string>com.apple.share-services</string>
|
<string>com.apple.share-services</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.0.803</string>
|
<string>2.1.804</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>33</string>
|
<string>34</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
|
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
|
||||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||||
<ProvisioningType>automatic</ProvisioningType>
|
<ProvisioningType>automatic</ProvisioningType>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -188,7 +189,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
|
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
|
||||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="System.Text.Json" Version="5.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="..\Gallery\Gallery.projitems" Label="Shared" Condition="Exists('..\Gallery\Gallery.projitems')" />
|
<Import Project="..\Gallery\Gallery.projitems" Label="Shared" Condition="Exists('..\Gallery\Gallery.projitems')" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||||
|
@ -79,9 +79,9 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.0.803</string>
|
<string>2.1.804</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>33</string>
|
<string>34</string>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>China</string>
|
<string>China</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Gallery.Resources;
|
using Gallery.Resources;
|
||||||
using Gallery.UI;
|
using Gallery.UI;
|
||||||
using Gallery.UI.Theme;
|
using Gallery.UI.Theme;
|
||||||
@ -897,7 +898,6 @@ namespace Gallery.Illust
|
|||||||
ImageSource ProfileImage { get; }
|
ImageSource ProfileImage { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonObject(MemberSerialization.OptIn)]
|
|
||||||
public class IllustItem : BindableObject, IIllustItem
|
public class IllustItem : BindableObject, IIllustItem
|
||||||
{
|
{
|
||||||
private static IllustItem empty;
|
private static IllustItem empty;
|
||||||
@ -924,7 +924,6 @@ namespace Gallery.Illust
|
|||||||
public static readonly BindableProperty BookmarkIdProperty = BindableProperty.Create(
|
public static readonly BindableProperty BookmarkIdProperty = BindableProperty.Create(
|
||||||
nameof(BookmarkId), typeof(string), typeof(IllustItem));
|
nameof(BookmarkId), typeof(string), typeof(IllustItem));
|
||||||
|
|
||||||
[JsonProperty]
|
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public int Rank { get; set; }
|
public int Rank { get; set; }
|
||||||
public string RankTitle => Rank > 0 ? $"#{Rank} {Title}" : Title;
|
public string RankTitle => Rank > 0 ? $"#{Rank} {Title}" : Title;
|
||||||
@ -950,49 +949,31 @@ namespace Gallery.Illust
|
|||||||
}
|
}
|
||||||
public bool IsPlaying { get; set; }
|
public bool IsPlaying { get; set; }
|
||||||
|
|
||||||
[JsonProperty]
|
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public string BookmarkId
|
public string BookmarkId
|
||||||
{
|
{
|
||||||
get => (string)GetValue(BookmarkIdProperty);
|
get => (string)GetValue(BookmarkIdProperty);
|
||||||
set => SetValue(BookmarkIdProperty, value);
|
set => SetValue(BookmarkIdProperty, value);
|
||||||
}
|
}
|
||||||
[JsonProperty]
|
|
||||||
public DateTime FavoriteDateUtc { get; set; }
|
public DateTime FavoriteDateUtc { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public string ImageUrl { get; set; }
|
public string ImageUrl { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public bool IsRestrict { get; set; }
|
public bool IsRestrict { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public string[] Tags { get; set; }
|
public string[] Tags { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public string ProfileUrl { get; set; }
|
public string ProfileUrl { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public string UserName { get; set; }
|
public string UserName { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public int Width { get; set; }
|
public int Width { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public int Height { get; set; }
|
public int Height { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public int PageCount { get; set; }
|
public int PageCount { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public double ImageHeightValue
|
public double ImageHeightValue
|
||||||
{
|
{
|
||||||
get => ImageHeight.IsAuto ? -1 : ImageHeight.Value;
|
get => ImageHeight.IsAuto ? -1 : ImageHeight.Value;
|
||||||
set => ImageHeight = value > 0 ? value : GridLength.Auto;
|
set => ImageHeight = value > 0 ? value : GridLength.Auto;
|
||||||
}
|
}
|
||||||
[JsonProperty]
|
|
||||||
public int YesRank { get; set; }
|
public int YesRank { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public int RatingCount { get; set; }
|
public int RatingCount { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public int ViewCount { get; set; }
|
public int ViewCount { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public long UploadTimestamp { get; set; }
|
public long UploadTimestamp { get; set; }
|
||||||
[JsonProperty]
|
|
||||||
public IllustType IllustType { get; set; }
|
public IllustType IllustType { get; set; }
|
||||||
|
|
||||||
public string PageCountText => $"{StyleDefinition.IconLayer} {PageCount}";
|
public string PageCountText => $"{StyleDefinition.IconLayer} {PageCount}";
|
||||||
|
@ -177,9 +177,9 @@ namespace Gallery.Illust
|
|||||||
var data = Stores.LoadIllustRankingData(lastQueryKey, queryDate, currentPage, out lastError, force);
|
var data = Stores.LoadIllustRankingData(lastQueryKey, queryDate, currentPage, out lastError, force);
|
||||||
if (data != null)
|
if (data != null)
|
||||||
{
|
{
|
||||||
if (int.TryParse(data.next, out int next))
|
if (data.next != null)
|
||||||
{
|
{
|
||||||
nextPage = next;
|
nextPage = data.next.Value;
|
||||||
}
|
}
|
||||||
var date = data.date;
|
var date = data.date;
|
||||||
DateTime now;
|
DateTime now;
|
||||||
|
@ -6,9 +6,9 @@ using System.Net;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace Gallery.Utils
|
namespace Gallery.Utils
|
||||||
{
|
{
|
||||||
@ -116,7 +116,7 @@ namespace Gallery.Utils
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = JsonConvert.DeserializeObject<T>(content);
|
result = JsonSerializer.Deserialize<T>(content);
|
||||||
file = namehandler(result);
|
file = namehandler(result);
|
||||||
rtn = true;
|
rtn = true;
|
||||||
}
|
}
|
||||||
@ -158,11 +158,11 @@ namespace Gallery.Utils
|
|||||||
error = null;
|
error = null;
|
||||||
if (nojson)
|
if (nojson)
|
||||||
{
|
{
|
||||||
return JsonConvert.DeserializeObject<T>("{}");
|
return JsonSerializer.Deserialize<T>("{}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return JsonConvert.DeserializeObject<T>(content);
|
return JsonSerializer.Deserialize<T>(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Newtonsoft.Json;
|
using System.Text.Json.Serialization;
|
||||||
using Gallery.Illust;
|
using Gallery.Illust;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
@ -9,54 +9,84 @@ namespace Gallery.Utils
|
|||||||
{
|
{
|
||||||
public class IllustResponse<T>
|
public class IllustResponse<T>
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public bool error;
|
public bool error;
|
||||||
|
[JsonInclude]
|
||||||
public string message;
|
public string message;
|
||||||
|
[JsonInclude]
|
||||||
public T body;
|
public T body;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BookmarkResultData
|
public class BookmarkResultData
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string last_bookmark_id;
|
public string last_bookmark_id;
|
||||||
|
[JsonInclude]
|
||||||
public string stacc_status_id;
|
public string stacc_status_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Illust
|
public class Illust
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string illustId;
|
public string illustId;
|
||||||
|
[JsonInclude]
|
||||||
public string illustTitle;
|
public string illustTitle;
|
||||||
|
[JsonInclude]
|
||||||
public string id;
|
public string id;
|
||||||
|
[JsonInclude]
|
||||||
public string title;
|
public string title;
|
||||||
|
[JsonInclude]
|
||||||
public int illustType;
|
public int illustType;
|
||||||
|
[JsonInclude]
|
||||||
public int xRestrict;
|
public int xRestrict;
|
||||||
|
[JsonInclude]
|
||||||
public string url;
|
public string url;
|
||||||
|
[JsonInclude]
|
||||||
public string description;
|
public string description;
|
||||||
|
[JsonInclude]
|
||||||
public string[] tags;
|
public string[] tags;
|
||||||
|
[JsonInclude]
|
||||||
public string userId;
|
public string userId;
|
||||||
|
[JsonInclude]
|
||||||
public string userName;
|
public string userName;
|
||||||
|
[JsonInclude]
|
||||||
public int width;
|
public int width;
|
||||||
|
[JsonInclude]
|
||||||
public int height;
|
public int height;
|
||||||
|
[JsonInclude]
|
||||||
public int pageCount;
|
public int pageCount;
|
||||||
|
[JsonInclude]
|
||||||
public IllustBookmark bookmarkData;
|
public IllustBookmark bookmarkData;
|
||||||
|
[JsonInclude]
|
||||||
public string alt;
|
public string alt;
|
||||||
|
[JsonInclude]
|
||||||
public IllustUrls urls;
|
public IllustUrls urls;
|
||||||
|
[JsonInclude]
|
||||||
public string seriesId;
|
public string seriesId;
|
||||||
|
[JsonInclude]
|
||||||
public string seriesTitle;
|
public string seriesTitle;
|
||||||
|
[JsonInclude]
|
||||||
public string profileImageUrl;
|
public string profileImageUrl;
|
||||||
|
|
||||||
public class IllustUrls
|
public class IllustUrls
|
||||||
{
|
{
|
||||||
[JsonProperty("250x250")]
|
[JsonInclude]
|
||||||
|
[JsonPropertyName("250x250")]
|
||||||
public string x250;
|
public string x250;
|
||||||
[JsonProperty("360x360")]
|
[JsonInclude]
|
||||||
|
[JsonPropertyName("360x360")]
|
||||||
public string x360;
|
public string x360;
|
||||||
[JsonProperty("540x540")]
|
[JsonInclude]
|
||||||
|
[JsonPropertyName("540x540")]
|
||||||
public string x540;
|
public string x540;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IllustBookmark
|
public class IllustBookmark
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string id;
|
public string id;
|
||||||
[JsonProperty("private")]
|
[JsonInclude]
|
||||||
|
[JsonPropertyName("private")]
|
||||||
public bool isPrivate;
|
public bool isPrivate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,115 +114,174 @@ namespace Gallery.Utils
|
|||||||
|
|
||||||
public class User
|
public class User
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string userId;
|
public string userId;
|
||||||
|
[JsonInclude]
|
||||||
public string name;
|
public string name;
|
||||||
|
[JsonInclude]
|
||||||
public string image;
|
public string image;
|
||||||
|
[JsonInclude]
|
||||||
public string imageBig;
|
public string imageBig;
|
||||||
|
[JsonInclude]
|
||||||
public bool premium;
|
public bool premium;
|
||||||
|
[JsonInclude]
|
||||||
public bool isFollowed;
|
public bool isFollowed;
|
||||||
//public string background;
|
//public string background;
|
||||||
|
[JsonInclude]
|
||||||
public int partial;
|
public int partial;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IllustFavoriteData : IllustResponse<IllustFavoriteBody> { }
|
public class IllustFavoriteData : IllustResponse<IllustFavoriteBody> { }
|
||||||
public class IllustFavoriteBody
|
public class IllustFavoriteBody
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public int total;
|
public int total;
|
||||||
|
[JsonInclude]
|
||||||
public Illust[] works;
|
public Illust[] works;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IllustData : IllustResponse<IllustBody> { }
|
public class IllustData : IllustResponse<IllustBody> { }
|
||||||
public class IllustBody
|
public class IllustBody
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public Page page;
|
public Page page;
|
||||||
|
[JsonInclude]
|
||||||
public Thumbnail thumbnails;
|
public Thumbnail thumbnails;
|
||||||
|
[JsonInclude]
|
||||||
public User[] users;
|
public User[] users;
|
||||||
|
|
||||||
public class Page
|
public class Page
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public int[] follow;
|
public int[] follow;
|
||||||
|
[JsonInclude]
|
||||||
public Recommends recommend;
|
public Recommends recommend;
|
||||||
|
[JsonInclude]
|
||||||
public RecommendByTag[] recommendByTags;
|
public RecommendByTag[] recommendByTags;
|
||||||
|
[JsonInclude]
|
||||||
public Ranking ranking;
|
public Ranking ranking;
|
||||||
|
[JsonInclude]
|
||||||
public RecommendUser[] recommendUser;
|
public RecommendUser[] recommendUser;
|
||||||
|
[JsonInclude]
|
||||||
public EditorRecommend[] editorRecommend;
|
public EditorRecommend[] editorRecommend;
|
||||||
|
[JsonInclude]
|
||||||
public string[] newPost;
|
public string[] newPost;
|
||||||
|
|
||||||
public class Recommends
|
public class Recommends
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string[] ids;
|
public string[] ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RecommendByTag
|
public class RecommendByTag
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string tag;
|
public string tag;
|
||||||
|
[JsonInclude]
|
||||||
public string[] ids;
|
public string[] ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Ranking
|
public class Ranking
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public RankingItem[] items;
|
public RankingItem[] items;
|
||||||
|
[JsonInclude]
|
||||||
public string date;
|
public string date;
|
||||||
|
|
||||||
public class RankingItem
|
public class RankingItem
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string rank;
|
public string rank;
|
||||||
|
[JsonInclude]
|
||||||
public string id;
|
public string id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RecommendUser
|
public class RecommendUser
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public int id;
|
public int id;
|
||||||
|
[JsonInclude]
|
||||||
public string[] illustIds;
|
public string[] illustIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EditorRecommend
|
public class EditorRecommend
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string illustId;
|
public string illustId;
|
||||||
|
[JsonInclude]
|
||||||
public string comment;
|
public string comment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Thumbnail
|
public class Thumbnail
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public Illust[] illust;
|
public Illust[] illust;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IllustPreloadBody
|
public class IllustPreloadBody
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public Dictionary<string, Illust> illust;
|
public Dictionary<string, Illust> illust;
|
||||||
|
[JsonInclude]
|
||||||
public Dictionary<string, User> user;
|
public Dictionary<string, User> user;
|
||||||
|
|
||||||
public class Illust
|
public class Illust
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string illustId;
|
public string illustId;
|
||||||
|
[JsonInclude]
|
||||||
public string illustTitle;
|
public string illustTitle;
|
||||||
|
[JsonInclude]
|
||||||
public string illustComment;
|
public string illustComment;
|
||||||
|
[JsonInclude]
|
||||||
public string id;
|
public string id;
|
||||||
|
[JsonInclude]
|
||||||
public string title;
|
public string title;
|
||||||
|
[JsonInclude]
|
||||||
public string description;
|
public string description;
|
||||||
|
[JsonInclude]
|
||||||
public int illustType;
|
public int illustType;
|
||||||
|
[JsonInclude]
|
||||||
public DateTime createDate;
|
public DateTime createDate;
|
||||||
|
[JsonInclude]
|
||||||
public DateTime uploadDate;
|
public DateTime uploadDate;
|
||||||
|
[JsonInclude]
|
||||||
public int xRestrict;
|
public int xRestrict;
|
||||||
|
[JsonInclude]
|
||||||
public IllustUrls urls;
|
public IllustUrls urls;
|
||||||
|
[JsonInclude]
|
||||||
public IllustTag tags;
|
public IllustTag tags;
|
||||||
|
[JsonInclude]
|
||||||
public string alt;
|
public string alt;
|
||||||
|
[JsonInclude]
|
||||||
public string userId;
|
public string userId;
|
||||||
|
[JsonInclude]
|
||||||
public string userName;
|
public string userName;
|
||||||
|
[JsonInclude]
|
||||||
public string userAccount;
|
public string userAccount;
|
||||||
//public Dictionary<string, Illust> userIllusts;
|
//public Dictionary<string, Illust> userIllusts;
|
||||||
|
[JsonInclude]
|
||||||
public int width;
|
public int width;
|
||||||
|
[JsonInclude]
|
||||||
public int height;
|
public int height;
|
||||||
|
[JsonInclude]
|
||||||
public int pageCount;
|
public int pageCount;
|
||||||
|
[JsonInclude]
|
||||||
public int bookmarkCount;
|
public int bookmarkCount;
|
||||||
|
[JsonInclude]
|
||||||
public int likeCount;
|
public int likeCount;
|
||||||
|
[JsonInclude]
|
||||||
public int commentCount;
|
public int commentCount;
|
||||||
|
[JsonInclude]
|
||||||
public int responseCount;
|
public int responseCount;
|
||||||
|
[JsonInclude]
|
||||||
public int viewCount;
|
public int viewCount;
|
||||||
|
[JsonInclude]
|
||||||
public bool isOriginal;
|
public bool isOriginal;
|
||||||
|
[JsonInclude]
|
||||||
public IllustBookmark bookmarkData;
|
public IllustBookmark bookmarkData;
|
||||||
|
|
||||||
public IllustItem CopyToItem(IllustItem item)
|
public IllustItem CopyToItem(IllustItem item)
|
||||||
@ -223,38 +312,56 @@ namespace Gallery.Utils
|
|||||||
|
|
||||||
public class IllustBookmark
|
public class IllustBookmark
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string id;
|
public string id;
|
||||||
[JsonProperty("private")]
|
[JsonInclude]
|
||||||
|
[JsonPropertyName("private")]
|
||||||
public bool isPrivate;
|
public bool isPrivate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IllustUrls
|
public class IllustUrls
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string mini;
|
public string mini;
|
||||||
|
[JsonInclude]
|
||||||
public string thumb;
|
public string thumb;
|
||||||
|
[JsonInclude]
|
||||||
public string small;
|
public string small;
|
||||||
|
[JsonInclude]
|
||||||
public string regular;
|
public string regular;
|
||||||
|
[JsonInclude]
|
||||||
public string original;
|
public string original;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IllustTag
|
public class IllustTag
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string authorId;
|
public string authorId;
|
||||||
|
[JsonInclude]
|
||||||
public bool isLocked;
|
public bool isLocked;
|
||||||
|
[JsonInclude]
|
||||||
public IllustTagItem[] tags;
|
public IllustTagItem[] tags;
|
||||||
|
[JsonInclude]
|
||||||
public bool writable;
|
public bool writable;
|
||||||
|
|
||||||
public class IllustTagItem
|
public class IllustTagItem
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string tag;
|
public string tag;
|
||||||
|
[JsonInclude]
|
||||||
public bool locked;
|
public bool locked;
|
||||||
|
[JsonInclude]
|
||||||
public bool deletable;
|
public bool deletable;
|
||||||
|
[JsonInclude]
|
||||||
public string userId;
|
public string userId;
|
||||||
|
[JsonInclude]
|
||||||
public IllustTranslate translation;
|
public IllustTranslate translation;
|
||||||
|
[JsonInclude]
|
||||||
public string userName;
|
public string userName;
|
||||||
|
|
||||||
public class IllustTranslate
|
public class IllustTranslate
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string en;
|
public string en;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,15 +372,22 @@ namespace Gallery.Utils
|
|||||||
public class IllustPageData : IllustResponse<IllustPageBody[]> { }
|
public class IllustPageData : IllustResponse<IllustPageBody[]> { }
|
||||||
public class IllustPageBody
|
public class IllustPageBody
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public Urls urls;
|
public Urls urls;
|
||||||
|
[JsonInclude]
|
||||||
public int width;
|
public int width;
|
||||||
|
[JsonInclude]
|
||||||
public int height;
|
public int height;
|
||||||
|
|
||||||
public class Urls
|
public class Urls
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string thumb_mini;
|
public string thumb_mini;
|
||||||
|
[JsonInclude]
|
||||||
public string small;
|
public string small;
|
||||||
|
[JsonInclude]
|
||||||
public string regular;
|
public string regular;
|
||||||
|
[JsonInclude]
|
||||||
public string original;
|
public string original;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -281,33 +395,43 @@ namespace Gallery.Utils
|
|||||||
public class IllustRecommendsData : IllustResponse<IllustRecommendsBody> { }
|
public class IllustRecommendsData : IllustResponse<IllustRecommendsBody> { }
|
||||||
public class IllustRecommendsBody
|
public class IllustRecommendsBody
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public Illust[] illusts;
|
public Illust[] illusts;
|
||||||
|
[JsonInclude]
|
||||||
public string[] nextIds;
|
public string[] nextIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IllustUserListData : IllustResponse<IllustUserListBody> { }
|
public class IllustUserListData : IllustResponse<IllustUserListBody> { }
|
||||||
public class IllustUserListBody
|
public class IllustUserListBody
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public Dictionary<string, object> illusts;
|
public Dictionary<string, object> illusts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IllustUserData : IllustResponse<IllustUserBody> { }
|
public class IllustUserData : IllustResponse<IllustUserBody> { }
|
||||||
public class IllustUserBody
|
public class IllustUserBody
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public Dictionary<string, Illust> works;
|
public Dictionary<string, Illust> works;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IllustUgoiraData : IllustResponse<IllustUgoiraBody> { }
|
public class IllustUgoiraData : IllustResponse<IllustUgoiraBody> { }
|
||||||
public class IllustUgoiraBody
|
public class IllustUgoiraBody
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string src;
|
public string src;
|
||||||
|
[JsonInclude]
|
||||||
public string originalSrc;
|
public string originalSrc;
|
||||||
|
[JsonInclude]
|
||||||
public string mime_type;
|
public string mime_type;
|
||||||
|
[JsonInclude]
|
||||||
public Frame[] frames;
|
public Frame[] frames;
|
||||||
|
|
||||||
public class Frame
|
public class Frame
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string file;
|
public string file;
|
||||||
|
[JsonInclude]
|
||||||
public int delay;
|
public int delay;
|
||||||
|
|
||||||
public string FilePath;
|
public string FilePath;
|
||||||
|
@ -1,76 +1,139 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using Gallery.Illust;
|
using Gallery.Illust;
|
||||||
|
|
||||||
namespace Gallery.Utils
|
namespace Gallery.Utils
|
||||||
{
|
{
|
||||||
public class IllustRankingData
|
public class IllustRankingData
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public Content[] contents;
|
public Content[] contents;
|
||||||
|
[JsonInclude]
|
||||||
public string mode;
|
public string mode;
|
||||||
|
[JsonInclude]
|
||||||
public string content;
|
public string content;
|
||||||
|
[JsonInclude]
|
||||||
public int page;
|
public int page;
|
||||||
public string prev;
|
[JsonInclude]
|
||||||
public string next;
|
[JsonConverter(typeof(Int32Converter))]
|
||||||
|
public int? prev;
|
||||||
|
[JsonInclude]
|
||||||
|
[JsonConverter(typeof(Int32Converter))]
|
||||||
|
public int? next;
|
||||||
|
[JsonInclude]
|
||||||
public string date;
|
public string date;
|
||||||
|
[JsonInclude]
|
||||||
|
[JsonConverter(typeof(StringConverter))]
|
||||||
public string prev_date;
|
public string prev_date;
|
||||||
|
[JsonInclude]
|
||||||
|
[JsonConverter(typeof(StringConverter))]
|
||||||
public string next_date;
|
public string next_date;
|
||||||
|
[JsonInclude]
|
||||||
public int rank_total;
|
public int rank_total;
|
||||||
|
|
||||||
public class Content
|
public class Content
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string title;
|
public string title;
|
||||||
|
[JsonInclude]
|
||||||
public string date;
|
public string date;
|
||||||
|
[JsonInclude]
|
||||||
public string[] tags;
|
public string[] tags;
|
||||||
|
[JsonInclude]
|
||||||
public string url;
|
public string url;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_type;
|
public string illust_type;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_book_style;
|
public string illust_book_style;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_page_count;
|
public string illust_page_count;
|
||||||
|
[JsonInclude]
|
||||||
public string user_name;
|
public string user_name;
|
||||||
|
[JsonInclude]
|
||||||
public string profile_img;
|
public string profile_img;
|
||||||
|
[JsonInclude]
|
||||||
public ContentType illust_content_type;
|
public ContentType illust_content_type;
|
||||||
|
[JsonInclude]
|
||||||
public object illust_series; // bool, Series
|
public object illust_series; // bool, Series
|
||||||
|
[JsonInclude]
|
||||||
public long illust_id;
|
public long illust_id;
|
||||||
|
[JsonInclude]
|
||||||
public int width;
|
public int width;
|
||||||
|
[JsonInclude]
|
||||||
public int height;
|
public int height;
|
||||||
|
[JsonInclude]
|
||||||
public long user_id;
|
public long user_id;
|
||||||
|
[JsonInclude]
|
||||||
public int rank;
|
public int rank;
|
||||||
|
[JsonInclude]
|
||||||
public int yes_rank;
|
public int yes_rank;
|
||||||
|
[JsonInclude]
|
||||||
public int rating_count;
|
public int rating_count;
|
||||||
|
[JsonInclude]
|
||||||
public int view_count;
|
public int view_count;
|
||||||
|
[JsonInclude]
|
||||||
public long illust_upload_timestamp;
|
public long illust_upload_timestamp;
|
||||||
|
[JsonInclude]
|
||||||
public string attr;
|
public string attr;
|
||||||
|
[JsonInclude]
|
||||||
public bool is_bookmarked;
|
public bool is_bookmarked;
|
||||||
|
[JsonInclude]
|
||||||
public bool bookmarkable;
|
public bool bookmarkable;
|
||||||
|
[JsonInclude]
|
||||||
public string bookmark_id;
|
public string bookmark_id;
|
||||||
|
[JsonInclude]
|
||||||
public string bookmark_illust_restrict;
|
public string bookmark_illust_restrict;
|
||||||
|
|
||||||
public class ContentType
|
public class ContentType
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public int sexual;
|
public int sexual;
|
||||||
|
[JsonInclude]
|
||||||
public bool lo;
|
public bool lo;
|
||||||
|
[JsonInclude]
|
||||||
public bool grotesque;
|
public bool grotesque;
|
||||||
|
[JsonInclude]
|
||||||
public bool violent;
|
public bool violent;
|
||||||
|
[JsonInclude]
|
||||||
public bool homosexual;
|
public bool homosexual;
|
||||||
|
[JsonInclude]
|
||||||
public bool drug;
|
public bool drug;
|
||||||
|
[JsonInclude]
|
||||||
public bool thoughts;
|
public bool thoughts;
|
||||||
|
[JsonInclude]
|
||||||
public bool antisocial;
|
public bool antisocial;
|
||||||
|
[JsonInclude]
|
||||||
public bool religion;
|
public bool religion;
|
||||||
|
[JsonInclude]
|
||||||
public bool original;
|
public bool original;
|
||||||
|
[JsonInclude]
|
||||||
public bool furry;
|
public bool furry;
|
||||||
|
[JsonInclude]
|
||||||
public bool bl;
|
public bool bl;
|
||||||
|
[JsonInclude]
|
||||||
public bool yuri;
|
public bool yuri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Series
|
public class Series
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string illust_series_caption;
|
public string illust_series_caption;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_series_content_count;
|
public string illust_series_content_count;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_series_content_illust_id;
|
public string illust_series_content_illust_id;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_series_content_order;
|
public string illust_series_content_order;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_series_create_datetime;
|
public string illust_series_create_datetime;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_series_id;
|
public string illust_series_id;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_series_title;
|
public string illust_series_title;
|
||||||
|
[JsonInclude]
|
||||||
public string illust_series_user_id;
|
public string illust_series_user_id;
|
||||||
|
[JsonInclude]
|
||||||
public string page_url;
|
public string page_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,21 +184,67 @@ namespace Gallery.Utils
|
|||||||
|
|
||||||
public class IllustGlobalData
|
public class IllustGlobalData
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string token;
|
public string token;
|
||||||
|
[JsonInclude]
|
||||||
public string oneSignalAppId;
|
public string oneSignalAppId;
|
||||||
|
[JsonInclude]
|
||||||
public UserData userData;
|
public UserData userData;
|
||||||
|
|
||||||
public class UserData
|
public class UserData
|
||||||
{
|
{
|
||||||
|
[JsonInclude]
|
||||||
public string id;
|
public string id;
|
||||||
|
[JsonInclude]
|
||||||
public string pixivId;
|
public string pixivId;
|
||||||
|
[JsonInclude]
|
||||||
public string name;
|
public string name;
|
||||||
|
[JsonInclude]
|
||||||
public string profileImg;
|
public string profileImg;
|
||||||
|
[JsonInclude]
|
||||||
public string profileImgBig;
|
public string profileImgBig;
|
||||||
|
[JsonInclude]
|
||||||
public bool premium;
|
public bool premium;
|
||||||
|
[JsonInclude]
|
||||||
public int xRestrict;
|
public int xRestrict;
|
||||||
|
[JsonInclude]
|
||||||
public bool adult;
|
public bool adult;
|
||||||
|
[JsonInclude]
|
||||||
public bool safeMode;
|
public bool safeMode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Int32Converter : JsonConverter<int?>
|
||||||
|
{
|
||||||
|
public override int? Read(ref Utf8JsonReader reader, System.Type typeToConvert, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
if (reader.TokenType == JsonTokenType.Number)
|
||||||
|
{
|
||||||
|
return reader.GetInt32();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Write(Utf8JsonWriter writer, int? value, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class StringConverter : JsonConverter<string>
|
||||||
|
{
|
||||||
|
public override string Read(ref Utf8JsonReader reader, System.Type typeToConvert, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
if (reader.TokenType == JsonTokenType.String)
|
||||||
|
{
|
||||||
|
return reader.GetString();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,9 @@ using System.Linq;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Gallery.Illust;
|
using Gallery.Illust;
|
||||||
using Xamarin.Essentials;
|
using Xamarin.Essentials;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
@ -147,7 +147,7 @@ namespace Gallery.Utils
|
|||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return JsonConvert.DeserializeObject<T>(content);
|
return JsonSerializer.Deserialize<T>(content);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -166,7 +166,7 @@ namespace Gallery.Utils
|
|||||||
string content;
|
string content;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
content = JsonConvert.SerializeObject(obj, Formatting.None);
|
content = JsonSerializer.Serialize(obj);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -651,6 +651,7 @@ namespace Gallery.Utils
|
|||||||
public FavoriteList Illusts { get; set; }
|
public FavoriteList Illusts { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonConverter(typeof(FavoriteListConverter))]
|
||||||
public class FavoriteList : List<IllustItem>
|
public class FavoriteList : List<IllustItem>
|
||||||
{
|
{
|
||||||
public bool Changed { get; private set; }
|
public bool Changed { get; private set; }
|
||||||
@ -683,6 +684,120 @@ namespace Gallery.Utils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class FavoriteListConverter : JsonConverter<FavoriteList>
|
||||||
|
{
|
||||||
|
public override FavoriteList Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
var list = new FavoriteList();
|
||||||
|
if (reader.TokenType != JsonTokenType.StartArray)
|
||||||
|
{
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
var item = new IllustItem();
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
if (reader.TokenType == JsonTokenType.EndArray)
|
||||||
|
{
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
if (reader.TokenType == JsonTokenType.EndObject)
|
||||||
|
{
|
||||||
|
list.Add(item);
|
||||||
|
item = new IllustItem();
|
||||||
|
}
|
||||||
|
else if (reader.TokenType == JsonTokenType.PropertyName)
|
||||||
|
{
|
||||||
|
var name = reader.GetString();
|
||||||
|
reader.Read();
|
||||||
|
switch (name)
|
||||||
|
{
|
||||||
|
case nameof(IllustItem.Title): item.Title = reader.GetString(); break;
|
||||||
|
case nameof(IllustItem.Id): item.Id = reader.GetString(); break;
|
||||||
|
case nameof(IllustItem.BookmarkId): item.BookmarkId = reader.GetString(); break;
|
||||||
|
case nameof(IllustItem.FavoriteDateUtc): item.FavoriteDateUtc = reader.GetDateTime(); break;
|
||||||
|
case nameof(IllustItem.ImageUrl): item.ImageUrl = reader.GetString(); break;
|
||||||
|
case nameof(IllustItem.IsRestrict): item.IsRestrict = reader.GetBoolean(); break;
|
||||||
|
case nameof(IllustItem.Tags):
|
||||||
|
if (reader.TokenType == JsonTokenType.StartArray)
|
||||||
|
{
|
||||||
|
var tags = new List<string>();
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
if (reader.TokenType == JsonTokenType.EndArray)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (reader.TokenType == JsonTokenType.String)
|
||||||
|
{
|
||||||
|
tags.Add(reader.GetString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.Tags = tags.ToArray();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case nameof(IllustItem.ProfileUrl): item.ProfileUrl = reader.GetString(); break;
|
||||||
|
case nameof(IllustItem.UserId): item.UserId = reader.GetString(); break;
|
||||||
|
case nameof(IllustItem.UserName): item.UserName = reader.GetString(); break;
|
||||||
|
case nameof(IllustItem.Width): item.Width = reader.GetInt32(); break;
|
||||||
|
case nameof(IllustItem.Height): item.Height = reader.GetInt32(); break;
|
||||||
|
case nameof(IllustItem.PageCount): item.PageCount = reader.GetInt32(); break;
|
||||||
|
case nameof(IllustItem.ImageHeightValue): item.ImageHeightValue = reader.GetDouble(); break;
|
||||||
|
case nameof(IllustItem.YesRank): item.YesRank = reader.GetInt32(); break;
|
||||||
|
case nameof(IllustItem.RatingCount): item.RatingCount = reader.GetInt32(); break;
|
||||||
|
case nameof(IllustItem.ViewCount): item.ViewCount = reader.GetInt32(); break;
|
||||||
|
case nameof(IllustItem.UploadTimestamp): item.UploadTimestamp = reader.GetInt64(); break;
|
||||||
|
case nameof(IllustItem.IllustType): item.IllustType = (IllustType)reader.GetInt32(); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new JsonException("unexpected favorite list ending");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Write(Utf8JsonWriter writer, FavoriteList value, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
writer.WriteStartArray();
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
for (var i = 0; i < value.Count; i++)
|
||||||
|
{
|
||||||
|
var item = value[i];
|
||||||
|
writer.WriteStartObject();
|
||||||
|
writer.WriteString(nameof(IllustItem.Title), item.Title);
|
||||||
|
writer.WriteString(nameof(IllustItem.Id), item.Id);
|
||||||
|
writer.WriteString(nameof(IllustItem.BookmarkId), item.BookmarkId);
|
||||||
|
writer.WriteString(nameof(IllustItem.FavoriteDateUtc), item.FavoriteDateUtc);
|
||||||
|
writer.WriteString(nameof(IllustItem.ImageUrl), item.ImageUrl);
|
||||||
|
writer.WriteBoolean(nameof(IllustItem.IsRestrict), item.IsRestrict);
|
||||||
|
if (item.Tags != null)
|
||||||
|
{
|
||||||
|
writer.WritePropertyName(nameof(IllustItem.Tags));
|
||||||
|
writer.WriteStartArray();
|
||||||
|
for (var n = 0; n < item.Tags.Length; n++)
|
||||||
|
{
|
||||||
|
writer.WriteStringValue(item.Tags[n]);
|
||||||
|
}
|
||||||
|
writer.WriteEndArray();
|
||||||
|
}
|
||||||
|
writer.WriteString(nameof(IllustItem.ProfileUrl), item.ProfileUrl);
|
||||||
|
writer.WriteString(nameof(IllustItem.UserId), item.UserId);
|
||||||
|
writer.WriteString(nameof(IllustItem.UserName), item.UserName);
|
||||||
|
writer.WriteNumber(nameof(IllustItem.Width), item.Width);
|
||||||
|
writer.WriteNumber(nameof(IllustItem.Height), item.Height);
|
||||||
|
writer.WriteNumber(nameof(IllustItem.PageCount), item.PageCount);
|
||||||
|
writer.WriteNumber(nameof(IllustItem.ImageHeightValue), item.ImageHeightValue);
|
||||||
|
writer.WriteNumber(nameof(IllustItem.YesRank), item.YesRank);
|
||||||
|
writer.WriteNumber(nameof(IllustItem.RatingCount), item.RatingCount);
|
||||||
|
writer.WriteNumber(nameof(IllustItem.ViewCount), item.ViewCount);
|
||||||
|
writer.WriteNumber(nameof(IllustItem.UploadTimestamp), item.UploadTimestamp);
|
||||||
|
writer.WriteNumber(nameof(IllustItem.IllustType), (int)item.IllustType);
|
||||||
|
writer.WriteEndObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
writer.WriteEndArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public enum SyncType
|
public enum SyncType
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
|
Reference in New Issue
Block a user