Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
* fix default is empty object * add counter check with no default or null
Uses json patch format for defaults: json patch (RFC 6902) makes it clearer in case of array contents. It is supported by nlohmann::json and can be applied with `patch` to fill up the json with defaults.