private static function objectToJsonLd($object, $useNativeTypes = true)
    {
        if ($object instanceof IRI) {
            $result = new JsonObject();
            $result->{'@id'} = (string) $object;

            return $result;
        } elseif ($object instanceof Value) {
            return $object->toJsonLd($useNativeTypes);
        }

        return $object;
    }
private static function objectToJsonLd($object, $useNativeTypes = true)
    {
        if ($object instanceof IRI) {
            $result = new JsonObject();
            $result->{'@id'} = (string) $object;

            return $result;
        } elseif ($object instanceof Value) {
            return $object->toJsonLd($useNativeTypes);
        }

        return $object;
    }
private static function objectToJsonLd ( $ object , $ useNativeTypes = true ) { if ( $ object instanceof IRI ) { $ result = new JsonObject ( ) ; $ result -> { '@id' } = ( string ) $ object ; return $ result ; } elseif ( $ object instanceof Value ) { return $ object -> toJsonLd ( $ useNativeTypes ) ; } return $ object ; }
Converts an object to a JSON-LD representation

Only {@link IRI IRIs}, {@link LanguageTaggedString language-tagged strings},
and {@link TypedValue typed values} are converted by this method. All
other objects are returned as-is.

@param JsonObject  $object         The object to convert.
@param boolean     $useNativeTypes If set to true, native types are used
for xsd:integer, xsd:double, and
xsd:boolean, otherwise typed strings
will be used instead.

@return mixed The JSON-LD representation of the object.
Converts an object to a JSON - LD representation