File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using LibHandler . Models ;
22using LibHandler . Util ;
3- using Newtonsoft . Json ;
3+ using System . Text . Json ;
44
55namespace LibHandler
66{
@@ -49,9 +49,8 @@ public static List<Book> GetBooks(string request)
4949 {
5050 List < string > ids = GetIDs ( request ) ;
5151 string jsonData = GetJSONData ( ids ) ;
52- return JsonConvert . DeserializeObject < List < Book > > ( jsonData ) ?? new List < Book > ( ) ;
52+ return JsonSerializer . Deserialize < List < Book > > ( jsonData ) ?? new List < Book > ( ) ;
5353 }
54-
5554 /// <summary>
5655 /// Returns the current mirror.
5756 /// </summary>
Original file line number Diff line number Diff line change 3232
3333 <ItemGroup >
3434 <PackageReference Include =" HtmlAgilityPack" Version =" 1.11.46" />
35- <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.3" />
3635 </ItemGroup >
3736
3837</Project >
Original file line number Diff line number Diff line change 44 "FullUrl" : " https://libgen.is" ,
55 "DownloadUrl" : " http://library.lol/"
66 },
7- {
8- "Url" : " libgen.gs" ,
9- "FullUrl" : " https://libgen.gs" ,
10- "DownloadUrl" : " http://library.lol/"
11- },
127 {
138 "Url" : " libgen.rs" ,
149 "FullUrl" : " https://libgen.rs" ,
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
3- using System . Linq ;
4- using System . Reflection ;
5- using System . Text ;
6- using System . Threading . Tasks ;
7-
8- namespace LibHandler . Util
1+ namespace LibHandler . Util
92{
103 internal static class DataHandler
114 {
Original file line number Diff line number Diff line change 1- using Newtonsoft . Json ;
2- using System . Linq ;
3- using System . Text . Json ;
1+ using System . Text . Json ;
42using System . Net . NetworkInformation ;
53using System . Reflection ;
64
@@ -35,7 +33,7 @@ static MirrorHandler()
3533
3634 //string config = File.ReadAllText(DataHandler.MIRROR_CONFIG_PATH);
3735 string config = reader . ReadToEnd ( ) ;
38- Mirrors = JsonConvert . DeserializeObject < List < Mirror > > ( config ) ?? new List < Mirror > ( ) ;
36+ Mirrors = JsonSerializer . Deserialize < List < Mirror > > ( config ) ?? new List < Mirror > ( ) ;
3937
4038 MainMirror = new Mirror ( ) ;
4139 MainMirror = GetMainMirror ( ) ;
You can’t perform that action at this time.
0 commit comments