X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=include%2Fload_layout.h;h=9205800f6fd3c4d390db4119010a702f3b6cd3d8;hp=0dd8131842ba2adb3f75f7b11a5151e6c41d406a;hb=HEAD;hpb=f354f534357798eb3ba497b7143132f41ff090f6 diff --git a/include/load_layout.h b/include/load_layout.h index 0dd81318..9205800f 100644 --- a/include/load_layout.h +++ b/include/load_layout.h @@ -31,6 +31,12 @@ typedef enum { * determine whether the file contains workspaces or regular containers, which * is important to know when deciding where (and how) to append the contents. * */ -json_content_t json_determine_content(const char *filename); +json_content_t json_determine_content(const char *buf, const size_t len); -void tree_append_json(Con *con, const char *filename, char **errormsg); +/** + * Returns true if the provided JSON could be parsed by yajl. + * + */ +bool json_validate(const char *buf, const size_t len); + +void tree_append_json(Con *con, const char *buf, const size_t len, char **errormsg);