Read Java Application.conf in C#

37 views Asked by At

There is an existing java project which has an application.conf file which looks like this:

general{
  name="prod2"
}

system {
  type=2
}

db {
  connection="jdbc:sqlite::memory:"
  dropTable=false
}

Are there any libraries in .NET which parse these Java config files. As its not any standard that i recognize. I havent been able to find any.

1

There are 1 answers

0
CathalMF On BEST ANSWER

Found out that this format is called HOCON (Human-Optimized Config Object Notation)

There are a few nuget packages out there that parse this. I used this one. https://www.nuget.org/packages/Hocon/1.0.0