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

what happens if we try to create a directive with no parameter, because the technique isn't expecting any ?