-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid types in CSL JSON items returned by DOI content negotiation #187
Comments
For example curl --location --header "Accept: application/vnd.citationstyles.csl+json" https://doi.org/10.7717/peerj.705 |
python -m json.tool Produces {
"indexed": {
"date-parts": [
[
2016,
12,
20
]
],
"date-time": "2016-12-20T02:24:14Z",
"timestamp": 1482200654778
},
"reference-count": 68,
"publisher": "PeerJ",
"content-domain": {
"domain": [],
"crossmark-restriction": false
},
"short-container-title": [],
"cited-count": 0,
"DOI": "10.7717/peerj.705",
"type": "journal-article",
"created": {
"date-parts": [
[
2015,
1,
13
]
],
"date-time": "2015-01-13T07:41:48Z",
"timestamp": 1421134908000
},
"page": "e705",
"source": "CrossRef",
"title": "Lung cancer incidence decreases with elevation: evidence for oxygen as an inhaled carcinogen",
"prefix": "http://id.crossref.org/prefix/10.7717",
"volume": "3",
"author": [
{
"given": "Kamen P.",
"family": "Simeonov",
"affiliation": [
{
"name": "Perelman School of Medicine, University of Pennsylvania, Philadelphia, PA, USA"
}
]
},
{
"given": "Daniel S.",
"family": "Himmelstein",
"affiliation": [
{
"name": "Biological & Medical Informatics, University of California, San Francisco, CA, USA"
}
]
}
],
"member": "http://id.crossref.org/member/4443",
"published-online": {
"date-parts": [
[
2015,
1,
13
]
]
},
"container-title": "PeerJ",
"original-title": [],
"deposited": {
"date-parts": [
[
2016,
12,
19
]
],
"date-time": "2016-12-19T17:18:42Z",
"timestamp": 1482167922000
},
"score": 1.0,
"subtitle": [],
"short-title": [],
"issued": {
"date-parts": [
[
2015,
1,
13
]
]
},
"alternative-id": [
"10.7717/peerj.705"
],
"URL": "http://dx.doi.org/10.7717/peerj.705",
"ISSN": [
"2167-8359"
],
"citing-count": 68
} Note the invalid |
Or for example, a bioRxiv preprint: curl --silent --location \
--header "Accept: application/vnd.citationstyles.csl+json" \
https://doi.org/10.1101/087619 |
python -m json.tool |
grep '"type":' Returns |
The event field of CSL data should be a string (https://git.io/vSSug). Instead the event key returns an object as shown below: ```sh curl --location \ --header "Accept: application/vnd.citationstyles.csl+json" \ https://doi.org/10.1109/icnn.1994.374637 \ | python -m json.tool ``` ```json "event": { "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)", "location": "Orlando, FL, USA", "acronym": "ICNN-94" }, ``` Related to CrossRef/rest-api-doc#187. DOI content negotiation returns invalid CSL
The event field of CSL data should be a string (https://git.io/vSSug). Instead the event key returns an object as shown below: ```sh curl --location \ --header "Accept: application/vnd.citationstyles.csl+json" \ https://doi.org/10.1109/icnn.1994.374637 \ | python -m json.tool ``` ```json "event": { "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)", "location": "Orlando, FL, USA", "acronym": "ICNN-94" }, ``` Related to CrossRef/rest-api-doc#187. DOI content negotiation returns invalid CSL
This build is based on bc4b817. This commit was created by the following Travis CI build and job: https://travis-ci.org/greenelab/deep-review/builds/221717485 https://travis-ci.org/greenelab/deep-review/jobs/221717486 [ci skip] The full commit message that triggered this build is copied below: CSL: remove malformated event field The event field of CSL data should be a string (https://git.io/vSSug). Instead the event key returns an object as shown below: ```sh curl --location \ --header "Accept: application/vnd.citationstyles.csl+json" \ https://doi.org/10.1109/icnn.1994.374637 \ | python -m json.tool ``` ```json "event": { "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)", "location": "Orlando, FL, USA", "acronym": "ICNN-94" }, ``` Related to CrossRef/rest-api-doc#187. DOI content negotiation returns invalid CSL
This build is based on bc4b817. This commit was created by the following Travis CI build and job: https://travis-ci.org/greenelab/deep-review/builds/221717485 https://travis-ci.org/greenelab/deep-review/jobs/221717486 [ci skip] The full commit message that triggered this build is copied below: CSL: remove malformated event field The event field of CSL data should be a string (https://git.io/vSSug). Instead the event key returns an object as shown below: ```sh curl --location \ --header "Accept: application/vnd.citationstyles.csl+json" \ https://doi.org/10.1109/icnn.1994.374637 \ | python -m json.tool ``` ```json "event": { "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)", "location": "Orlando, FL, USA", "acronym": "ICNN-94" }, ``` Related to CrossRef/rest-api-doc#187. DOI content negotiation returns invalid CSL
See also #43 (comment) by @aurimasv. |
The event field of CSL data should be a string (https://git.io/vSSug). Instead the event key returns an object as shown below: ```sh curl --location \ --header "Accept: application/vnd.citationstyles.csl+json" \ https://doi.org/10.1109/icnn.1994.374637 \ | python -m json.tool ``` ```json "event": { "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)", "location": "Orlando, FL, USA", "acronym": "ICNN-94" }, ``` Related to CrossRef/rest-api-doc#187. DOI content negotiation returns invalid CSL
Thanks @kjw for the fix. And the reference to the commit that closes this issue is really helpful! I'm currently getting an invalid CSL type for a DOI registered with DataCite. I reprorted that issue to datacite/datacite#182, since I'm assuming it's a DataCite issue rather than a Crossref issue. |
Yes, the DataCite content negotation uses different code. I will follow-up at datacite/datacite#182. |
This is not working anymore. https://doi.org/10.1101/2021.08.15.21262067 returns |
The event field of CSL data should be a string (https://git.io/vSSug). Instead the event key returns an object as shown below: ```sh curl --location \ --header "Accept: application/vnd.citationstyles.csl+json" \ https://doi.org/10.1109/icnn.1994.374637 \ | python -m json.tool ``` ```json "event": { "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)", "location": "Orlando, FL, USA", "acronym": "ICNN-94" }, ``` Related to CrossRef/rest-api-doc#187. DOI content negotiation returns invalid CSL
Sorry if this issue is a bit off topic. @gbilder mentioned this repo on twitter.
DOI content negation that accepts
application/vnd.citationstyles.csl+json
produces item types that are not part of the CSL specification.Specifically, I had to convert the following invalid types:
The text was updated successfully, but these errors were encountered: