cp_txt <- '[ {"id":"JolySilencetablemanners2008","accessed":{"date-parts":[[2019,10,27]]},"author":[{"family":"Joly","given":"Janneke F."},{"family":"Stapel","given":"Diederik A."},{"family":"Lindenberg","given":"Siegwart M."}],"container-title":"Personality and Social Psychology Bulletin","container-title-short":"Pers. Soc. Psychol. Bull.","DOI":"10.1177/0146167208318401","ISSN":"0146-1672, 1552-7433","issue":"8","issued":{"date-parts":[[2008,8]]},"language":"en","page":"1047-1056","references":"Retraction published 2012, <i>Personality and Social Psychology Bulletin, 38</i>[10], 1378, https://doi.org/10.1177/0146167212462821","source":"Crossref","title":"Silence and table manners: when environments activate norms","title-short":"Silence and table manners","type":"article-journal","URL":"http://journals.sagepub.com/doi/10.1177/0146167208318401","volume":"34"}]'
cp_parsed <- citeproc_reader(cp_txt)
names(cp_parsed)
When reading the Citeproc/CSL JSON format, handlr currently discards any valid CSL variables that are not part of its internal Crosscite format. This seems quite suboptimal, because it means that handlr can really only properly work with Citeproc data for a small number of item types (pretty much just article-journal
and webpage
). For example, the genre
and medium
variables that are used to indicate the category for a report or thesis are discarded. The variable editor
is used for books and book chapters. In the example data I provide above, the variable references
is discarded.
If I were to generate a reference for this item using the American Psychological Association CSL style, it would be:
Joly, J. F., Stapel, D. A., & Lindenberg, S. M. (2008). Silence and table manners: When environments activate norms. Personality and Social Psychology Bulletin, 34(8), 1047β1056. https://doi.org/10.1177/0146167208318401 (Retraction published 2012, Personality and Social Psychology Bulletin, 38[10], 1378, https://doi.org/10.1177/0146167212462821)
However, if I import the item to handlr, export to CSL JSON again, and render the citation, it's:
Joly, J. F., Stapel, D. A., & Lindenberg, S. M. (2008). Silence and table manners: When environments activate norms. Personality and Social Psychology Bulletin, 34(8), 1047β1056. https://doi.org/10.1177/0146167208318401
The retraction information has been lost.
Other variables, such as annote
, , genre
, note
, medium
, collection-title
, number
, and illustrator
are also all discarded on import
For item types and fields that don't have a Crosscite analogue, it seems like it would be wise to store these in the item data (e.g., as csl_note
, csl_medium
) and map them to other formats at translation time as needed.