-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Show fetch exception at citation relation #13549
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
base: main
Are you sure you want to change the base?
Conversation
@trag-bot didn't find any issues in the code! ✅✨ |
@@ -106,6 +106,8 @@ dependencies { | |||
|
|||
implementation("com.fasterxml:aalto-xml") | |||
|
|||
implementation("org.hisp.dhis:json-tree") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why another json library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For optionals use kongs unirest json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why another json library?
Because I know the author personally. And it is fast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For optionals use kongs unirest json
Show me. 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I know the author personally. And it is fast
Argument by authority is not a valid reason
see: eg.g
JSONObject result = item.getJSONObject("resultList").getJSONArray("result").getJSONObject(0);
jabref/jablib/src/main/java/org/jabref/logic/importer/fetcher/EuropePmcFetcher.java
Line 117 in e29044c
Optional.ofNullable(result.optString("pubModel")).ifPresent(pubModel -> entry.setField(StandardField.HOWPUBLISHED, pubModel)); |
|
||
if (referencesResponse.getData() == null) { | ||
JsonNode json = JsonNode.of(response); | ||
JsonNode disclaimerJson = json.getOrNull("citingPaperInfo.openAccessPdf.disclaimer"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use kong's unirest json that allows you to use optionals
JSONObject response = JsonReader.toJsonObject(inputStream);
JSONObject journal = journalInfo.getJSONObject("journal");
Optional.ofNullable(journal.optString("title")).ifPresent(title -> entry.setField(StandardField.JOURNAL, title));
```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no new json library
use kongs unirest json for this
Background
The API does not return the citing information, but their web page does
https://www.semanticscholar.org/paper/Decentralized-Application-Placement-in-Fog-Mann/6870975f7f4db00ad1e2fa041545b67c6e8ef73c
Steps to test
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)