2 Serd C API — Serd 0.32.2 documentation

# 2 Serd C API

- 2.1 Status Codes
- 2.2 String Utilities
- 2.3 Byte Streams
- 2.4 URI
- 2.5 Node
- 2.6 Event Handlers
- 2.7 Environment
- 2.8 Reader
- 2.9 Writer

struct SerdChunk

  An unterminated string fragment.

  const uint8_t *buf

    Start of chunk.

  size_t len

    Length of chunk in bytes.

enum SerdSyntax

  RDF syntax type.

  enumerator SERD_TURTLE

    Terse triples http://www.w3.org/TR/turtle.

  enumerator SERD_NTRIPLES

    Line-based triples http://www.w3.org/TR/n-triples/.

  enumerator SERD_NQUADS

    Line-based quads http://www.w3.org/TR/n-quads/.

  enumerator SERD_TRIG

    Terse quads http://www.w3.org/TR/trig/.

enum SerdNodeFlag

  Flags indicating certain string properties relevant to serialisation.

  enumerator SERD_HAS_NEWLINE

    Contains line breaks (’n’ or ‘r’)

  enumerator SERD_HAS_QUOTE

    Contains quotes (‘”’)

typedef uint32_t SerdNodeFlags

  Bitwise OR of SerdNodeFlag values.

void serd_free(void *ptr)

  Free memory allocated by Serd.

  This function exists because some systems require memory allocated by a library to be freed by code in the same library. It is otherwise equivalent to the standard C free() function.