-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change decrypt method
- Loading branch information
Showing
4 changed files
with
96 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Text.Json; | ||
|
||
namespace nHash.Providers; | ||
|
||
public class JsonBeautifier | ||
{ | ||
private readonly JsonSerializerOptions _serializerOptions; | ||
|
||
public JsonBeautifier() | ||
{ | ||
_serializerOptions = new JsonSerializerOptions | ||
{ | ||
WriteIndented = true, | ||
PropertyNameCaseInsensitive = true | ||
}; | ||
} | ||
|
||
public string Set(string text) | ||
{ | ||
var jsonElement = JsonDocument.Parse(text).RootElement; | ||
var prettyJson = JsonSerializer.Serialize(jsonElement, _serializerOptions); | ||
return prettyJson; | ||
} | ||
} |
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,6 @@ | ||
namespace nHash.SubFeatures.Texts; | ||
|
||
public class JsonFeature | ||
{ | ||
|
||
} |
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