Skip to content

Commit

Permalink
Merge pull request #45 from ojdev/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ojdev committed Jan 7, 2020
2 parents ead3097 + 768c98f commit 2ca59c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# RabbitMQ.EventBus.AspNetCore           [Wiki](https://github.com/ojdev/RabbitMQ.EventBus.AspNetCore/wiki)
[![DNC](https://img.shields.io/badge/.netcore-%3E%3D3.0-green.svg)](#)
[![CodeFactor](https://www.codefactor.io/repository/github/ojdev/rabbitmq.eventbus.aspnetcore/badge)](https://www.codefactor.io/repository/github/ojdev/rabbitmq.eventbus.aspnetcore)
[![AppVeyor](https://img.shields.io/appveyor/ci/ojdev/rabbitmq-eventbus-aspnetcore.svg?style=popout)](https://ci.appveyor.com/project/ojdev/rabbitmq-eventbus-aspnetcore)
[![NuGet](https://img.shields.io/nuget/v/RabbitMQ.EventBus.AspNetCore.svg?style=popout)](https://www.nuget.org/packages/RabbitMQ.EventBus.AspNetCore)
[![NuGet](https://img.shields.io/nuget/dt/RabbitMQ.EventBus.AspNetCore.svg?style=popout)](https://www.nuget.org/packages/RabbitMQ.EventBus.AspNetCore)
[![GitHub license](https://img.shields.io/github/license/ojdev/RabbitMQ.EventBus.AspNetCore.svg)](https://github.com/ojdev/RabbitMQ.EventBus.AspNetCore/blob/master/LICENSE)
Expand Down
5 changes: 4 additions & 1 deletion src/RabbitMQ.EventBus.AspNetCore/Events/EventHandlerArgs.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using Microsoft.Extensions.Logging;
using System;
using System.ComponentModel;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Unicode;

namespace RabbitMQ.EventBus.AspNetCore.Events
{
Expand Down Expand Up @@ -57,7 +59,8 @@ public TEvent Event
{
_event = JsonSerializer.Deserialize<TEvent>(Original, new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true
PropertyNameCaseInsensitive = true,
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
});
}
catch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Text;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Unicode;

namespace System
{
Expand All @@ -16,7 +18,11 @@ internal static class DynamicExtensions
/// <returns></returns>
public static string Serialize<TMessage>(this TMessage message)
{
return JsonSerializer.Serialize(message);
return JsonSerializer.Serialize(message, new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true,
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
});
}
/// <summary>
///
Expand Down

0 comments on commit 2ca59c6

Please sign in to comment.