X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Ftable.c;h=537fae97c32fbf6e8bf0e94eb46e6b005ebec810;hb=05e547e7ee479fa2c3ca5bc9d2eb57bc8a07bdb8;hp=ff11e7816ffcdccaf8dcd98dee1346a4f2636fc3;hpb=f85748f7f1228fc7dcf5a9280e01d4bd9f13df1e;p=sliver-openvswitch.git diff --git a/lib/table.c b/lib/table.c index ff11e7816..537fae97c 100644 --- a/lib/table.c +++ b/lib/table.c @@ -480,8 +480,10 @@ table_print_json__(const struct table *table, const struct table_style *style) const struct cell *cell = table_cell__(table, y, x); if (cell->text) { json_array_add(row, json_string_create(cell->text)); - } else { + } else if (cell->json) { json_array_add(row, json_clone(cell->json)); + } else { + json_array_add(row, json_null_create()); } } json_array_add(data, row);