Running mvn exec:java -Dexec.mainClass="examples.RdfSerializationExample" in Wikidata-Toolkit-Examples, I get:
2024-02-28 08:49:15 ERROR - Error when reading JSON for entity: Cannot construct instance of `org.wikidata.wdtk.datamodel.implementation.StringValueImpl`, problem: A string value must provide a non-null string
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: java.util.ArrayList[0]->org.wikidata.wdtk.datamodel.implementation.FormDocumentImpl["claims"]->java.util.LinkedHashMap["P7243"]->java.util.ArrayList[0]->org.wikidata.wdtk.datamodel.implementation.StatementImpl$PreStatement["qualifiers"]->java.util.LinkedHashMap["P898"]->java.util.ArrayList[0]->org.wikidata.wdtk.datamodel.implementation.ValueSnakImpl["datavalue"])
Arguably that's a Wikibase bug: https://phabricator.wikimedia.org/T358644
But it could be worth making sure we don't choke on such JSON serializations, if they can happen.
Running
mvn exec:java -Dexec.mainClass="examples.RdfSerializationExample"
in Wikidata-Toolkit-Examples, I get:This is due to the following lexeme which has an invalid IPA transcription: https://www.wikidata.org/wiki/Lexeme:L1259271
Arguably that's a Wikibase bug: https://phabricator.wikimedia.org/T358644 But it could be worth making sure we don't choke on such JSON serializations, if they can happen.