I am trying to upload the articles of my journal through the DOAJ API from OJS. The DOAJ api only accept json. I export the article in xml, it is valid with an XML validator together with the schema (doajArticles.xsd) https://doaj.org/schemas /doajArticles.xsd and the result is satisfactory.
As the DOAJ API requires uploading the contents in json, through a converter I convert the previously validated xml to json format and try to upload it, but I always get the error:
{
“status”: “bad_request”,
“error”: “Field ‘bibjson’ is required but not present at ‘root’ (ref: fcfd8e64-d6e7-11e8-bdd3-04014a62b401)”
What OJS version do you use? The current OJS 3.1.1-4 supports the DOAJ API and the (semi-)automatic registration from within OJS.
Does maybe looking at this PHP code from the OJS 3.1.1-4, how the JSON is constructed, would help you: ojs/DOAJJsonFilter.inc.php at ojs-stable-3_1_1 · pkp/ojs · GitHub?
Else, the new JSON format is slightly different than the XML, so the simple conversion could not work.
If I understand correctly, you produce/export DOAJ XML from OJS2, verify it, convert it to JSON and deposit it using API.
What are you actually trying? Why don’t you deposit XML directly? I mean why manually convert XML to JSON and import it using API (which is supposed to be automatically).