encode

Serialises config to a pretty-printed JSON string.