nav_order | parent |
---|---|
28 |
Decision Records |
In the context of an http server, when a http client GETs
a JSON data structure containing BibTeX data, which format should that have?
- Offer both, BibTeX string and CSL JSON
- Return BibTeX as is as string
- Convert BibTeX to JSON
Chosen option: "Offer both, BibTeX string and CSL JSON", because there are many browser libraries out there being able to parse BibTeX. Thus, we don't need to convert it.
- Good, because this follows "Backend for Frontend"
- Good, because Word Addin works seamless with the data provided (and does not need another dependency)
- Good, because other clients can work with BibTeX data
- Bad, because two serializations have to be kept
- Good, because we don't need to think about any conversion
- Bad, because it is unclear how to ship BibTeX data where the entry is dependent on
- Bad, because client needs an additional parsing logic
More thought has to be done when converting to JSON. There seems to be a JSON format from @citation-js/plugin-bibtex. We could do an additional self-made JSON format, but this increases the number of available JSON serializations for BibTeX.
- Good, because it could flatten BibTeX data (example:
author = first # " and " # second
) - Bad, because conversion is difficult in BibTeX special cases. For instance, if Strings are used (example:
author = first # " and " # second
) and one doesn't want to flatten ("normalize") this.
Existing JavaScript BibTeX libraries: