Anonymous

Module:MwJson: Difference between revisions

From OSL Demo
Update package: OSW Core
(Update package: OSW Core)
(Update package: OSW Core)
Line 672: Line 672:
if (statement["HasSubject"] == nil or statement["HasSubject"][1] == nil or statement["HasSubject"][1] == "") then --implicit subject
if (statement["HasSubject"] == nil or statement["HasSubject"][1] == nil or statement["HasSubject"][1] == "") then --implicit subject
if (statement["HasProperty"] ~= nil and statement["HasProperty"][1] ~= nil and statement["HasProperty"][1] ~= "" and statement["HasObject"] ~= nil) then
if (statement["HasProperty"] ~= nil and statement["HasProperty"][1] ~= nil and statement["HasProperty"][1] ~= "" and statement["HasObject"] ~= nil) then
local property = p.splitString(statement["HasProperty"][1], ":")[2]
local property = string.gsub(statement["HasProperty"][1], p.keys.property_ns_prefix .. ":", "") -- also allow prefix properties like: Property:schema:url
if (debug) then
if (debug) then
mw.log("Set property " .. property .. " from statement to ")
mw.log("Set property " .. property .. " from statement to ")
Cookies help us deliver our services. By using our services, you agree to our use of cookies.