Documentation

JsonLdStreamSerializer
in package
implements SerializerInterface Uses TmpStreamSerializerTrait

A steaming JsonLD serializer. Generates output in the flatten JsonLD format and does it in a greedy way (meaning subjects/predicates/values are acumulated within graph/subject/predicate only if adjacent triples share the same graph/subject/predicate). On the brigh side it's fast and has minimal memory footprint.

To use this parser with the \quickRdfIo\Util::serialize() use the special jsonld-stream value as $format.

Tags
author

zozlak

Interfaces, Classes, Traits and Enums

SerializerInterface

Table of Contents

DEFAULT_GRAPH_ID  = '_:defaultGraph'
MODE_GRAPH  = 2
MODE_TRIPLES  = 1
$context  : array<string, string>
$contextJson  : string
$firstValue  : bool
$mode  : int
$prevGraph  : TermInterface
$prevPredicate  : TermInterface
$prevSubject  : TermInterface
__construct()  : mixed
serialize()  : string
serializeStream()  : void
prepareContext()  : void
processGraph()  : void
processObject()  : void
processPredicate()  : void
processSubject()  : void
serializeId()  : string
serializeNode()  : mixed

Constants

Properties

Methods

__construct()

public __construct([int $mode = self::MODE_GRAPH ]) : mixed
Parameters
$mode : int = self::MODE_GRAPH
Tags
Return values
mixed

        

Search results