Serd 0.14.0 has been released. Serd is a lightweight C library for RDF syntax which supports reading and writing [Turtle][], [TriG][], [NTriples][], and [NQuads][]. Serd is suitable for performance-critical or resource-limited applications, such as serialising very large data sets or embedded systems.
Changes:
- Add SerdBulkSink for writing bulk output and corresponding serdi -B option
- Add serd_chunk_sink for easy writing to a string
- Add serd_file_sink for easy writing to a FILE* stream
- Add serd_node_new_blob and serd_base64_decode for handling arbitrary binary data via base64 encoding
- Add serd_node_new_file_uri() and serd_file_uri_parse() and implement proper URI to/from path hex escaping, etc.
- Add serd_reader_set_default_graph() for reading a file as a named graph
- Add serd_strtod(), serd_node_new_decimal(), and serd_node_new_integer() for locale-independent numeric node parsing/serialising
- Add serd_uri_serialise_relative() for making URIs relative to a base where possible (by chopping a common prefix and adding dot segments)
- Add serd_writer_get_env()
- Add serd_writer_set_root_uri() and corresponding -r option to serdi to enable writing URIs with up references (../)
- Add serdi -f option to prevent URI qualification
- Escape ASCII control characters in output (e.g. fix problems with string literals that start with a backspace)
- Handle a quote as the last character of a long string literal in the writer (by escaping it) rather than the reader, to avoid writing Turtle other tools fail to parse
- Handle files and strings that start with a UTF-8 Byte Order Mark
- Implement pretty-printing for collections
- Improve URI resolution to cover most of the abnormal cases from RFC3986
- Improve write performance by doing bulk writes for unescaped substrings
- Install man page to DATADIR (e.g. PREFIX/share/man, not PREFIX/man)
- Make URIs serialised by the writer properly escape characters
- Parse collections iteratively in O(1) space
- Remove use of multi-byte peek (readahead) and use exactly 1 page for read buffer (instead of 2)
- Report read error if both "genid" and "docid" IDs are found in the same document, to prevent silent merging of distinct blank nodes
- Report reason for failure to open file in serdi
- Resolve dot segments in serd_uri_resolve() instead of at write time
- Support Windows file://c:/foo URIs in serd_uri_to_path() on all platforms
- Support compilation as C++ under MSVC++
- Support file://localhost/foo URIs in serd_uri_to_path()
- Tolerate invalid characters in string literals by replacing with the Unicode replacement character
- Use path variables in pkgconfig files