Skip to content

Commit

Permalink
Renamed STJsonHelper to SystemTextJsonHelper.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsagara committed Nov 16, 2023
1 parent fa815df commit 026a1e4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<LangVersion>12.0</LangVersion>

<!-- NuGet -->
<Version>2.0.3</Version>
<Version>2.0.4</Version>
<AssemblyVersion>2.0.0</AssemblyVersion>
<FileVersion>2.0.0</FileVersion>
<Authors>Jon Sagara</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static ContentResult CreateBadRequestJsonContentResult(ModelStateDiction
{
// Since the vast majority of forms on this site use Pascal casing to match variable names, serialize
// model state in Pascal case so that we can work with the client side variable names.
var content = STJsonHelper.Serialize(modelState.ToSlimModelStateDictionary(), camelCase: false);
var content = SystemTextJsonHelper.Serialize(modelState.ToSlimModelStateDictionary(), camelCase: false);

return new ContentResult
{
Expand Down
10 changes: 5 additions & 5 deletions src/Sagara.Core.Caching/RedisCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected ConnectionMultiplexer InitializeConnectionMultiplexer(ConfigurationOpt

if (!string.IsNullOrWhiteSpace(value))
{
return STJsonHelper.Deserialize<T>(value!);
return SystemTextJsonHelper.Deserialize<T>(value!);
}
}
catch (Exception ex)
Expand Down Expand Up @@ -149,7 +149,7 @@ protected ConnectionMultiplexer InitializeConnectionMultiplexer(ConfigurationOpt
var value = (string?)redisResult;
if (!string.IsNullOrWhiteSpace(value))
{
return STJsonHelper.Deserialize<T>(value);
return SystemTextJsonHelper.Deserialize<T>(value);
}
}
catch (Exception ex)
Expand Down Expand Up @@ -183,7 +183,7 @@ protected ConnectionMultiplexer InitializeConnectionMultiplexer(ConfigurationOpt
var value = (string?)redisResult;
if (!string.IsNullOrWhiteSpace(value))
{
return STJsonHelper.Deserialize<T>(value);
return SystemTextJsonHelper.Deserialize<T>(value);
}
}
catch (Exception ex)
Expand Down Expand Up @@ -213,7 +213,7 @@ public async Task<bool> SetAsync(string key, object value, TimeSpan? expiry = nu
var db = GetDatabase();

return await db
.StringSetAsync(key, STJsonHelper.Serialize(value), expiry)
.StringSetAsync(key, SystemTextJsonHelper.Serialize(value), expiry)
.ConfigureAwait(false);
}
catch (Exception ex)
Expand Down Expand Up @@ -242,7 +242,7 @@ public bool Set(string key, object value, TimeSpan? expiry = null)
{
var db = GetDatabase();

return db.StringSet(key, STJsonHelper.Serialize(value), expiry);
return db.StringSet(key, SystemTextJsonHelper.Serialize(value), expiry);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Sagara.Core.Json.SystemTextJson;
/// <summary>
/// Helper methods for serializing JSON with System.Text.Json.
/// </summary>
public static class STJsonHelper
public static class SystemTextJsonHelper
{
private static JsonSerializerOptions _serializeCamelCasePrettyPrint = new()
{
Expand Down

0 comments on commit 026a1e4

Please sign in to comment.