Add Canonical JSON serialization library with tests and documentation
- Implemented CanonJson class for deterministic JSON serialization and hashing. - Added unit tests for CanonJson functionality, covering various scenarios including key sorting, handling of nested objects, arrays, and special characters. - Created project files for the Canonical JSON library and its tests, including necessary package references. - Added README.md for library usage and API reference. - Introduced RabbitMqIntegrationFactAttribute for conditional RabbitMQ integration tests.
This commit is contained in:
@@ -607,7 +607,7 @@ public sealed class StellaEndpointGenerator : IIncrementalGenerator
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" using var sha256 = global::System.Security.Cryptography.SHA256.Create();");
|
||||
sb.AppendLine(" var hash = sha256.ComputeHash(global::System.Text.Encoding.UTF8.GetBytes(content));");
|
||||
sb.AppendLine(" return $\"\\\"{global::System.Convert.ToHexString(hash)[..16]}\\\"\";");
|
||||
sb.AppendLine(" return $\"\\\"{(global::System.Convert.ToHexString(hash)[..16])}\\\"\";");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine("}");
|
||||
|
||||
Reference in New Issue
Block a user