Questions tagged [hocon]

HOCON (Human-Optimized Config Object Notation) keep the semantics (tree structure; set of types; encoding/escaping) from JSON, but make it more convenient as a human-editable config file format.

HOCON (Human-Optimized Config Object Notation) keeps the semantics (tree structure; set of types; encoding/escaping) from JSON, but makes it more convenient as a human-editable config file format.

https://github.com/typesafehub/config/blob/master/HOCON.md

90 questions
0
votes
1 answer

gradle shadowJar combine configuration files in HOCON format

How can I combine application.con HOCON formatted files for lightben/typesafe configuration https://github.com/lightbend/config when creating a fat jar using gradle with the shadow plugin? I.e. there are > 1 module which provide a application.conf…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
0
votes
1 answer

Convert entry hocon to dataframe

I have this entry "channels" in hocon format: param { channels = [ { name = "MainPhone" id = 1 } { name = "OpPhone" id = 2 } { name = "Fax" id = 3 } ] } What I need is to convert the…
Beto Javi
  • 67
  • 4
0
votes
0 answers

How to get time substitution in Hocon

Subject: Variables in Hocon, String concatenation and date substitution. Current Use case: I am trying to get a simple string with a date like the following via the Hocon Config: "myElasticSearchIndex_25Jan2018" What have I tried in the hocon: …
0
votes
1 answer

How to read a "string":int array into a HOCON Configuration?

So what I have is the below for a config. "minecraft:blaze" { "HOB Night" { # This Feature has not been Implemented yet "============Custom Drops============" { # True = Custom Drops, False = Vanilla "Enable Custom Drops:…
0
votes
2 answers

AKKA .conf file configuration to .properties file

In my test.conf file I have the following configuration akka { actor { provider = "akka.cluster.ClusterActorRefProvider" serializers { java = "akka.serialization.JavaSerializer" } serialization-bindings { …
Rohit Thakur
  • 244
  • 2
  • 12
0
votes
1 answer

Typesafe config HOCON - guidance for environment variable replacement of lists?

Here's what I end up using, because I cannot seem to get the variable replacement in good order. Given the Play Framework HOCON section for CORS Allowed Origins, which allows for local, dev, stage and production deployment, and is NOT 12-factor…
rbellamy
  • 5,683
  • 6
  • 38
  • 48
0
votes
1 answer

Ignore database config in play 2.5.x

I am trying to automate some aspect of deploying a play2/sbt app to a restricted containerized environment, and have some limitation in place. mainly what I am trying to achieve is to set database config for a specific named db connection only when…
ezzarghili
  • 198
  • 14
0
votes
2 answers

Typesafe ConfigFactory error with reserved characters

Hi I am trying to load configuration from a String in Java as follows: @Test public void testIllegalCharacter(){ String input = "prop=\\asd"; Config conf = ConfigFactory.parseString(input); } The code above produces the following…
nuvio
  • 2,555
  • 4
  • 32
  • 58
0
votes
1 answer

Is good practice? Custom properties in akka configuration (application.conf)

I wrote akka application in scala, application related properties also I kept it in application.conf along with akka config. I find it is logical place to keep properties. If it is not good practice I would like to know reasoning behind it, for…
0
votes
1 answer

Overriding a Database object in application.conf to no-op in certain environments

I am trying to setup an application that has multiple database connections (some for readonly and some for readwrite). 95% of the time I would like both to be configured and, as such, I've got the environment variables specified appropriately to…
Micah
  • 50
  • 5
0
votes
2 answers

How to read size in bytes syntax in Play configuration (HOCON)?

The Play documentation claims it supports declaring sizes in quantity prefixes (MB, MiB, GB, etc.) It doesn't however state how I'm supposed to read such values in code. I have the following configuration value: discavo.upload.image.maxSize = 2…
Zoltán
  • 21,321
  • 14
  • 93
  • 134
0
votes
1 answer

how to iterate over hocon config object?

I have following JSON, { "child1-name" : { "child1child1-name" : "child1child1-value", "child1child2-name" : "child1child2-value" }, "child2" : { "child2child1-name" : "child2child1-value" }, …
Sohan
  • 6,252
  • 5
  • 35
  • 56
0
votes
1 answer

HOCON included java properties file contains special characters

I need to include java properties file to my application.conf file. This properties file contains special (to hocon) characters like '*' or ':' in properties values. So I get a run-time error when application starts and tries to load…
Alexander Camperov
  • 393
  • 2
  • 5
  • 11
0
votes
1 answer

Playframework 2.3 application.conf configuration substitution

In application.conf I added the following properties property1="value1" property2="prefix ${property1}" In any controller I added the following code println(Play.application.configuration.underlying.getString("property1")) …
raisercostin
  • 8,777
  • 5
  • 67
  • 76
0
votes
1 answer

Configuring actor behavior using typesafe Config and HOCON

I am building a large agent-based / multi-agent model of a stock exchange using Akka/Play/Scala, etc and I am struggling a bit to understand how to configure my application. Below is a snippet of code that illustrates an example of the type of…
davidrpugh
  • 4,363
  • 5
  • 32
  • 46
1 2 3 4 5
6