There are currently two ways to provide a configuration to workerd serve:
- A capnproto text file (e.g.,
workerd serve my-config.capnp)
- Binary encoded capnproto (with the
--binary flag)
For driving workerd with another program in ecosystems with poor capnproto support, it would be nice to be able to provide configuration via JSON.
Looks like the ability to translate back and forth from JSON is available in capnproto here:
https://github.com/capnproto/capnproto/blob/master/c++/src/capnp/compat/json.h
There are currently two ways to provide a configuration to
workerd serve:workerd serve my-config.capnp)--binaryflag)For driving workerd with another program in ecosystems with poor capnproto support, it would be nice to be able to provide configuration via JSON.
Looks like the ability to translate back and forth from JSON is available in capnproto here:
https://github.com/capnproto/capnproto/blob/master/c++/src/capnp/compat/json.h