aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/writer.h
AgeCommit message (Collapse)AuthorFilesLines
2023-12-02[WIP] Add support for URI hex escape decodingDavid Robillard1-0/+16
2023-12-02Use ZixStringView directlyDavid Robillard1-2/+2
2023-12-02Add "contextual" output optionDavid Robillard1-0/+9
This is mainly for developer or power-user cases, where one wants to look at some data for investigation or debugging. In such cases, it's common for the set of prefixes to be implicitly known (because they are baked in to the application, for example), so printing them just produces a large amount of redundant noise. That said, it can also be useful programmatically, because it allows several snippets to be written independently and ultimately concatenated (with a header to define the prefixes) without redundancy.
2023-12-02Add "longhand" mode to write rdf:type predicates normallyDavid Robillard1-0/+7
2023-12-02Make blank node prefixing automaticDavid Robillard1-10/+0
Though potentially useful, I don't think the complexity cost of the old interface (both to the implementation and to the user) is worth it. A special tool to transform blank node labels (for example with regular expressions) would be a better approach to this if it's ever needed in the future.
2023-12-02[WIP] Simplify reader and writer flagsDavid Robillard1-5/+44
[WIP] Testing?
2023-12-02[WIP] Move SerdEnv mutation from writer to readerDavid Robillard1-1/+1
Writing having side-effects seems questionable in general, and this prepares things for expanding URIs in the reader.
2023-12-02Simplify output stream APIDavid Robillard1-10/+10
2023-12-02Make serd_writer_set_root_uri() take a string viewDavid Robillard1-3/+2
This is generally more convenient, and the node was just being copied anyway.
2023-12-02Factor out and expose serd_write_file_uri()David Robillard1-1/+0
2023-12-02Use Zix attributes directlyDavid Robillard1-15/+17
2023-12-02Replace SERD_WRITE_STRICT flag with SERD_WRITE_LAXDavid Robillard1-1/+1
The unset value for flags should represent the best default, which in this case is strict parsing. Lax parsing is the riskier opt-in option.
2023-12-02Add support for writing terse output with minimal newlinesDavid Robillard1-0/+1
2023-12-02Replace multiple stream callbacks with SerdEventDavid Robillard1-9/+0
This makes plumbing easier since everything goes through the same "stream" and only one callback is required to handling everything. It's also more easily extensible in case more event types need to be added in the future.
2023-12-02Simplify writer style options and write UTF-8 by defaultDavid Robillard1-6/+5
2023-12-02Add SerdWorld for shared library stateDavid Robillard1-13/+3
2023-12-02Add SerdSink interface and hide implementationsDavid Robillard1-36/+4
2023-12-02Bring read/write interface closer to the C standardDavid Robillard1-17/+5
2023-12-02Simplify node construction APIDavid Robillard1-6/+5
2023-12-02Merge datatype/language into nodeDavid Robillard1-3/+1
This moves closer to the sord API, and is more convenient in most cases.
2023-12-02Make nodes opaqueDavid Robillard1-9/+7
2023-12-02Split up public API headerDavid Robillard1-0/+172