Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
node-rdf2json
Advanced tools
Readme
#node-rdf2json
node-rdf2json can help users in transforming RDF/XML (resource centric) into JSON (key-value centric).
#Usage:
Add node-rdf2json module to your require path:
var rdf2json = require("rdf2json");
Generate JSON based on a URL:
rdf2json.rdf2json.convertURLIntoRDFJSON(url, format, function(err, rdfjson){
var obj = eval("(" + rdfjson + ")");
sys.puts(sys.inspect(obj));
});
Generate JSON from an RDF file:
rdf2json.convertFileIntoRDFJSON(filepath, format, function(err, rdfjson){
var obj = eval("(" + rdfjson + ")");
sys.puts(sys.inspect(obj));
});
Generate JSON from a RDF string:
rdf2json.convertStringIntoRDFJSON(str, format, function(err, rdfjson){
var obj = eval("(" + rdfjson + ")");
sys.puts(sys.inspect(obj));
});
#Supported RDF/JSON formats
As the time of the last release, there is no "standard" mapping between RDF and JSON and node-rdf2json supports the following RDF/JSON formats (will be extended continuously):
[1] "flat": Flat RDF/JSON format.
example:
rdf2json.convertFileIntoRDFJSON("./test/wine.rdf", "flat", function(err, rdfjson){
// do something with rdfjson
});
[2] "sparql": SPARQL RDF/JSON format.
example:
rdf2json.convertURLIntoRDFJSON("http://www.w3.org/TR/owl-guide/wine.rdf", "sparql", function(err, rdfjson){
// do something with rdfjson
});
[3] "talis": Talis RDF/JSON format.
exmaple:
rdf2json.convertStringIntoRDFJSON("" +
"<?xml version=\"1.0\"?>" +
" <!DOCTYPE rdf:RDF [" +
" <!ENTITY vin \"http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#\" >" +
" <!ENTITY food \"http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#\" >" +
" <!ENTITY owl \"http://www.w3.org/2002/07/owl#\" >" +
" <!ENTITY xsd \"http://www.w3.org/2001/XMLSchema#\" >" +
"]>" +
...
"</rdf:RDF>", "talis", function(err, rdfjson){
// do something with rdfjson
});
FAQs
node-rdf2json can help users in transforming RDF/XML into JSON
The npm package node-rdf2json receives a total of 10 weekly downloads. As such, node-rdf2json popularity was classified as not popular.
We found that node-rdf2json demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.