forked from zsh2401/AutumnBox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* ============================================================================== | ||
* | ||
* Filename: JsonHelper | ||
* Description: | ||
* | ||
* Version: 1.0 | ||
* Created: 2020/5/16 21:03:40 | ||
* Compiler: Visual Studio 2019 | ||
* | ||
* Author: zsh2401 | ||
* | ||
* ============================================================================== | ||
*/ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace AutumnBox.Core | ||
{ | ||
/// <summary> | ||
/// 具体的Json实现方案 | ||
/// </summary> | ||
internal static class JsonHelper | ||
{ | ||
public static T DeserializeObject<T>(string json) | ||
{ | ||
return JsonConvert.DeserializeObject<T>(json); | ||
} | ||
public static string SerializeObject(object jsonObject) | ||
{ | ||
return JsonConvert.SerializeObject(jsonObject); | ||
} | ||
} | ||
} |
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