yaml startup config support

174 views
Skip to first unread message

Jeremy Truelove

unread,
Dec 5, 2014, 2:24:23 PM12/5/14
to ve...@googlegroups.com
Any plans to add yaml support for the primary startup config? Currently container.config() assumes it is returning a JsonObject and so doesn't like a .yml file being passed in so it explodes and you get a "SEVERE: Configuration file does not contain a valid JSON object". Not a biggie but there is a nice brevity to yaml etc.. 

Weston Price

unread,
Dec 5, 2014, 3:21:23 PM12/5/14
to ve...@googlegroups.com
Not a bad idea. I wouldn't be adverse to supporting varying file formats for configuration. I like YAML as well :-)

Jeremy Truelove

unread,
Dec 5, 2014, 3:27:08 PM12/5/14
to ve...@googlegroups.com
I could take a stab at it, right now it assumes a JsonObject is being returned. It could be as simple as just have a raw file returned from a new method then you do whatever you want with it, using jackson to parse a  yaml file into a config object is just a line of code of code after all. You of course could just leave the old api call intact. Does that sound horrid or reasonable? For example

MyServerConfig cfg = new ObjectMapper(new YAMLFactory()).readValue(configFile, MyServerConfig.class);

--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/fSixssNPSUM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Weston Price

unread,
Dec 5, 2014, 3:31:30 PM12/5/14
to ve...@googlegroups.com
Sure, give it a shot and then submit it as a pull request. Thanks for your interest and contribution. We are always looking for help. 

Rohit Verma

unread,
Nov 6, 2015, 7:09:48 AM11/6/15
to vert.x, weston...@gmail.com
Is the pull request for above merged?

Jeremy Truelove

unread,
Nov 6, 2015, 9:26:44 AM11/6/15
to ve...@googlegroups.com, weston...@gmail.com

I don't think the work has been done yet.

Clement Escoffier

unread,
Nov 6, 2015, 9:31:33 AM11/6/15
to ve...@googlegroups.com
Hi,

No the YAML support has not been done.

Clement
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages