Documentation

JsonLdSerializable

The JsonLdSerializable interface

Objects implementing JsonLdSerializable can be serialized to JSON-LD.

Tags
author

Markus Lanthaler mail@markus-lanthaler.com

Table of Contents

Methods

toJsonLd()  : mixed
Convert to expanded and flattened JSON-LD

Methods

toJsonLd()

Convert to expanded and flattened JSON-LD

public toJsonLd([bool $useNativeTypes = true ]) : mixed

The result can then be serialized to JSON-LD by JsonLD::toString().

Parameters
$useNativeTypes : bool = true

If set to true, native types are used for xsd:integer, xsd:double, and xsd:boolean, otherwise typed strings will be used instead.

Tags
see
JsonLD::toString()
Return values
mixed

Returns data which can be serialized by JsonLD::toString() (which is a value of any type other than a resource) to expanded JSON-LD.


        
On this page

Search results