added ::publish_json method, resolves #14