ropensci / handlr

convert among citation formats
https://docs.ropensci.org/handlr
Other
38 stars 4 forks source link

fix: when reading from string/json some functions give file attribute as that string #11

Closed sckott closed 5 years ago

sckott commented 5 years ago
z <- system.file('extdata/citeproc.json', package = "handlr")
x <- codemeta_writer(citeproc_reader(z))
out <- codemeta_reader(x)
attr(out, "file")
{
  "@context": "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld",
  "@type": "BlogPosting",
  "@id": "https://doi.org/10.5438/4k3m-nyvg",
  "identifier": "https://doi.org/10.5438/4k3m-nyvg",
  "title": "Eating your own Dog Food",
  "agents": [
    {
      "@type": "Person",
      "name": "Martin Fenner",
      "givenName": "Martin",
      "familyName": "Fenner"
    }
  ],
  "description": "Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for...",
  "tags": ["Phylogeny", "Malaria", "Parasites", "Taxonomy", "Mitochondrial genome", "Africa", "Plasmodium"],
  "datePublished": "2016-12-20",
  "publisher": "DataCite"
}