add set_format() / allow json WS

Signed-off-by: Johannes Dewender <github@JonnyJD.net>