Commit 397c351b authored by Volker Krause's avatar Volker Krause
Browse files

Expose JsonLdDocument::apply to extractor scripts

parent 78af4036
......@@ -376,6 +376,14 @@ QJSValue JsApi::JsonLd::readQDateTime(const QVariant &obj, const QString &propNa
return toJson(dt);
QJSValue JsApi::JsonLd::apply(const QJSValue &lhs, const QJSValue &rhs) const
const auto lhsVar = JsonLdDocument::fromJsonSingular(QJsonValue::fromVariant(lhs.toVariant()).toObject());
const auto rhsVar = JsonLdDocument::fromJsonSingular(QJsonValue::fromVariant(rhs.toVariant()).toObject());
const auto v = JsonLdDocument::apply(lhsVar, rhsVar);
return toJson(v);
void JsApi::JsonLd::setContextDate(const QDateTime& dt)
m_contextDate = dt;
......@@ -98,6 +98,9 @@ public:
Q_INVOKABLE QJSValue readQDateTime(const QVariant &obj, const QString &propName) const;
/** @see JsonLdDocument::apply. */
Q_INVOKABLE QJSValue apply(const QJSValue &lhs, const QJSValue &rhs) const;
///@cond internal
void setContextDate(const QDateTime &dt);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment