Skip to main content

parse_csl_json

Function parse_csl_json 

Source
pub fn parse_csl_json(text: &str) -> Vec<Result<ParsedEntry, ParseError>>
Expand description

Parse a CSL-JSON document — a JSON array of objects, each with at least an id (citation key) and one of DOI, or archivePrefix

  • eprint (arXiv).

Identifier-pick priority per ADR-0030 D3:

  1. DOI field (case-sensitive per the CSL-JSON spec but Zotero sometimes emits doi lowercase — we accept both).
  2. archivePrefix == "arXiv" (case-insensitive) + eprint (or note: "arXiv:..." shape Zotero emits).
  3. (PMID parking — Ref::Pmid not yet defined; PMIDs in CSL-JSON are recorded as parse failures with NoIdentifier until the variant lands.)

entry_key is the id field verbatim.