Fixes #5778: correct API with JSON parameters for directives creation&up...

Good question, it should be possible to do so.