JsonLdSerializable
in
The JsonLdSerializable interface
Objects implementing JsonLdSerializable can be serialized to JSON-LD.
Tags
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
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.