Closed darkfrog26 closed 6 years ago
Sure, look at the parser api
Basically everything under the eu.unicredit package
Sorry for the late response to this, but the issue I'm facing now is that your facade (https://github.com/akka-js/shocon/tree/master/shared/src/main/scala/com/typesafe/config) is getting in the way for projects that actually use Typesafe Config (Akka for example). I'm getting:
java.lang.NoSuchMethodError: com.typesafe.config.ConfigFactory.load(Ljava/lang/ClassLoader;)Lcom/typesafe/config/Config;
Because it's not hitting Typesafe Config now, it's hitting the facade instead. Can this functionality be broken out into a different module to avoid this problem?
it makes sense to publish two separate modules(basic parser and typesafe config facade), PR are welcome or I will eventually do it at some point.
@andreaTP PR submitted. Let me know if I've missed something. It's a bit hacky as the SBT file could really use some cleanup, but that's a PR for another day. ;)
@andreaTP when can I expect a new release to Maven?
@evacchi I am looking at shocon.ConfigParser.parseString
. Is this the right method to return JSON?
I understand a lot may have changed since 2018 when this issue was filed. Please let me know the new intended way to read a hocon file and output json. I am using scalajs to import the file like so:
@js.native
@JSImport("assets/app.conf", JSImport.Default)
object AppConfig extends js.Any
// this returns shocon.Config.Object... how do I get Json?
shocon.ConfigParser.parseString(AppConfig.asInstanceOf[String])
Is there any way to use shocon to just parse a HOCON file and then convert it to JSON without the whole config loader baggage?