Skip to content
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

JSON serialization fails for property documents #67

Closed
mkroetzsch opened this issue Apr 29, 2014 · 1 comment · Fixed by #68
Closed

JSON serialization fails for property documents #67

mkroetzsch opened this issue Apr 29, 2014 · 1 comment · Fixed by #68
Assignees
Labels

Comments

@mkroetzsch
Copy link
Member

The JSON serialization does not work for property documents. When processing properties in the dump, the following kind of error appears:

2014-04-29 16:12:04 ERROR - Failed to process JSON for property Revision 123411026 of page Property:P1251 (ns 120, id 18134330). Created at 2014-04-28T11:46:17Z by Palapa (45891) with comment "/* wbsetlabel-add:1|bs */ ABS ASCL kod". Model wikibase-property (application/json). Text length: 340 (org.json.JSONException: Wikibase property ids must have the form "P<positive integer>")

This was unnoticed since the example program did not actually process property documents at all (it registered the serializer only for items), which was fixed in #66.

@guenthermi
Copy link
Member

Seams to be a problem in the parser fnctions. The JsonException is thrown here

JSONObject jsonObject = new JSONObject(mwRevision.getText());
PropertyDocument propertyDocument = this.jsonConverter
.convertToPropertyDocument(jsonObject,
mwRevision.getTitle());

in WikibaseRevisionProcessor.processPropertyRevision(MwRevision mwRevision)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants