Fixes #5778: correct API with JSON parameters for directives creation&update
Merge pull request #707 from fanf/bug_5778/using_json_to_create_directive_is_not_working_with_api

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