jackson-dataformat-hocon icon indicating copy to clipboard operation
jackson-dataformat-hocon copied to clipboard

cannot include yaml file

Open davidkarlsen opened this issue 6 years ago • 0 comments

If I have a .conf file:

{ a : { include required(classpath("myyaml")) } }

I will get a stack-trace with:

Caused by: java.io.IOException: resource not found on classpath: myyaml.conf
	at com.typesafe.config.impl.Parseable$ParseableResources.rawParseValue(Parseable.java:735)
	at com.typesafe.config.impl.Parseable$ParseableResources.rawParseValue(Parseable.java:710)
	at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:180)
	... 47 more

and if I give a suffix:

{ a : { include required(classpath("myyaml.yaml")) } }

I will get:

Caused by: java.io.IOException: resource not found on classpath: myyaml.yaml.conf
	at com.typesafe.config.impl.Parseable$ParseableResources.rawParseValue(Parseable.java:735)
	at com.typesafe.config.impl.Parseable$ParseableResources.rawParseValue(Parseable.java:710)
	at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:180)
	... 47 more

Seems this is not supported? But from the github readme I see:

In short, HOCON combines YAML, JSON, and Properties files into a single format. On most cases, YAML, JSON, and Properties formats are all valid HOCON--- and it can be mixed and matched at will. Check out the HOCON docs for more detail on the format.

davidkarlsen avatar Oct 17 '17 10:10 davidkarlsen