From 196db2ef0cd44c3fb542b86be7929bd01d83e138 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 Aug 2021 22:33:47 -0400 Subject: Put rdf:type properties first when pretty-printing This is a common convention in Turtle and TriG because the special "a" syntax for rdf type as the first property looks nice, makes things easier to read, and can be useful for streaming implementations because the type of the instance is known before reading its properties. Also significantly clean up the pretty-printing implementation in the process. --- tools/console.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/console.c') diff --git a/tools/console.c b/tools/console.c index f1e78d75..d7f67c35 100644 --- a/tools/console.c +++ b/tools/console.c @@ -218,6 +218,7 @@ serd_set_output_option(const SerdStringView name, {"verbatim", SERD_WRITE_VERBATIM}, {"terse", SERD_WRITE_TERSE}, {"lax", SERD_WRITE_LAX}, + {"rdf_type", SERD_WRITE_RDF_TYPE}, {NULL, SERD_WRITE_ASCII}, }; -- cgit v1.2.1