aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/read_trig.c1
-rw-r--r--src/writer.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/read_trig.c b/src/read_trig.c
index d710eaeb..e3d7a7e9 100644
--- a/src/read_trig.c
+++ b/src/read_trig.c
@@ -128,6 +128,7 @@ read_block(SerdReader* const reader, ReadContext* const ctx)
}
ctx->graph = token;
+ (*ctx->flags) |= (s_type == '[' ? SERD_EMPTY_G : 0U);
return read_wrappedGraph(reader, ctx);
}
diff --git a/src/writer.c b/src/writer.c
index 372e4279..940b22a0 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -923,7 +923,8 @@ write_blank(SerdWriter* const writer,
}
if ((field == SERD_SUBJECT && (flags & SERD_EMPTY_S)) ||
- (field == SERD_OBJECT && (flags & SERD_EMPTY_O))) {
+ (field == SERD_OBJECT && (flags & SERD_EMPTY_O)) ||
+ (field == SERD_GRAPH && (flags & SERD_EMPTY_G))) {
return esink("[]", 2, writer);
}
}