Add documentation for to_hash, as_json, to_json and json_create.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>