Skip to main content

to_csl_array

Function to_csl_array 

Source
pub fn to_csl_array(citation_key: &str, m: &Metadata) -> Value
Expand description

Render m as a CSL JSON 1.0 array (a single-element array, so it is a drop-in for citeproc-js / pandoc --csl-json consumers that expect a list of items), keyed by citation_key.

journal-article → CSL article-journal; everything else → manuscript (citeproc-js renders that without forcing a container). Empty optional fields are omitted from the JSON.