2
votes

I'm a newbie on Akka.NET so excuse me if this question is silly.

I've tried to suppress the following Akka.NET warning

"NewtonSoftJsonSerializer has been detected as a default serializer. It will be obsoleted in Akka.NET starting from version 1.5 in the favor of Hyperion for more info visit: http://getakka.net/docs/Serialization#how-to-setup-hyperion-as-default-serializer If you want to suppress this message set HOCON 'akka.suppress-json-serializer-warning' config flag to on."

But I'm not entirely sure where can I set that flag.

So far I've tried

var config = ConfigurationFactory.ParseString(@"
akka {
    actor {
       akka.suppress-json-serializer-warning = true
          }
     }");
TlogSystem = ActorSystem.Create("TlogSystem",config);

But it doesn't work, it keep printing the warning. Could someone point me at the right direction?

2

2 Answers

2
votes

Try moving suppress-json-serializer-warning outside the actor block:

akka {
    suppress-json-serializer-warning = on
}
0
votes

Of course, the warning can be switched off in some way, but you could also consider doing what the warning says.. that is.. use Hyperion instead of Json for serializing in Akka. It can be done in the Config as follows:

     akka {
                serializers {
                  hyperion = ""Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion""
                }
                serialization-bindings {
                  ""System.Object"" = hyperion
                }
          }