I am currently trying to use akka.net but the configuration they use HOCON is a different syntax from the json syntax normally used in app.json when configuring our app. Does anyone know how to use HOCON with the current app.json configuration?
相关问题
- slurm: use a control node also for computing
- Which encryption algorithm do we use in Asp.net 5
- ASP NET 5 Localization using View components in a
- Route action based on HTTP verb?
- .NET Core 3.1 CreateHostBuilder Cannot parse JSON
相关文章
- How to define function that returns html in asp.ne
- Bad Request - Invalid Hostname when accessing loca
- How to use relative line numbering universally in
- ActionContext gone in Microsoft.AspNetCore.Mvc.Con
- How to log ASP.NET Core input JSON serialization e
- Client Side Deep Links with WebpackDevMiddleware 4
- On scala project - Getting error GC overhead limit
- Debugging with Eclipse CDT and GDB: can't find
What you can do is putting the HOCON in its own text file and then executing the following:
Then pass that hocon object into the ActorSystem.Create(string name, Config config)
Dont forget tp make the file "Copy Always" or "Copy If Newer"
I use ConfigurationFactory.FromObject and some classes that has the properties that I'm interested in to read the akka-config from appsettings.
Notice that I haven't bothered to figure out how to parse kebab-case properties from appsettings. So I have just renamed the properties excluding the hyphens. Then set the JsonProperty-attribute to the correct name so that FromObject can deserialize it correctly.
appsettings.json: