Storing Additional Structured Data (JSON?) in Notes or Extra Field
Apologies if there is a thread about this, a quick search did not turn it up. We have a need to expand our zotero records with a few extra fields specific to our bibliographic project and are wondering about safe ways to add structured data and still use the Zotero API to harvest it.
If were to put JSON encoded data into either a Note or the Extra field would the Zotero database escape everything properly or would we risk injecting unclosed JSON objects into our data if we forget a closing bracket or similar. An initial test seems to show the Zotero API escaping everything properly.
Is there a preferred way other than this? Is this something that might be different once support for JSON-LD is fully implemented.
Thanks!
If were to put JSON encoded data into either a Note or the Extra field would the Zotero database escape everything properly or would we risk injecting unclosed JSON objects into our data if we forget a closing bracket or similar. An initial test seems to show the Zotero API escaping everything properly.
Is there a preferred way other than this? Is this something that might be different once support for JSON-LD is fully implemented.
Thanks!
I think in part this just because it's easier to write, but also, JSON would of course give you JSON within JSON in the API which seems like a mess to me.
Here are some examples of basic key/value data items which fall outside of Zotero's current data model, some are familiar as things that perhaps will be in a future Zotero release:
1. Entering DOIs for books
2. Entering page number ranges for some types which do not allow them
3. Entering series name and number when a book belongs to more than one series
4. Entering URIs for authority control
5. Entering multiple URIs or identifier numbers for citations to link them to other online bibliographies
This is a partner project of ours who is doing similar stuff: https://github.com/biblia-arabica/arabic-bible-bibliography/blob/master/documentation/BiAr_Manual.pdf
@fbennett I had not had a chance to catch up with Juris-m until now but perhaps we might follow your example. Is there a best way to contact you outside the forums?
I've since moved away from JSON in the extra field; my own "extra-fields" are marked with a leading "tex."
Which API do you mean? The Zotero API? That just treats the extra field as an opaque blob of UTF-8 text. It doesn't attach any meaning to "lines", that's something that the CSL processor inside Zotero does.