Fix issue #19, accept as argument too

This commit is contained in:
QC 2014-01-29 20:45:38 +01:00
parent 13da91b200
commit 78845b52f4

View file

@ -124,6 +124,9 @@ static pmenu *get_json ( )
if (json_input_file[0] == '-' && json_input_file[1] == '\0') {
jo = read_json_file_descr(stdin);
}
else if (json_input_file[0] == '{' && strlen(json_input_file) > 3) {
jo = json_tokener_parse(json_input_file);
}
else
{
FILE *fd = fopen(json_input_file, "r");