'extra' field in 'registered_meta' 'summary' object is serialized as an object and as an array.
See original GitHub issueSummary
The registered_meta
field carries an object named summary
. The summary
object carries a field named extra
. I have two registrations; each registration serializes the extra
field differently.
Both registrations would have been made by the UI (not the API). Note that 5nua2
was registered some time after tgzhk
(August vs March), so maybe some change in the underlying code base is responsible for this?
Steps
- Look at
registered_meta
fortgzhk
(note: using version 2.2 of the API)-extra
is serialized as an empty object:
"registered_meta": {
"summary": {
"value": "Test registration.",
"comments": [],
"extra": {}
}
}
- Look at
registered_meta
for5nua2
(note: using version 2.2 of the API)-extra
is serialized as an empty array:
"registered_meta": {
"summary": {
"value": "test",
"comments": [],
"extra": []
}
}
Expected
I would expect the type of the extra
field to be consistent. That is, for all registered_meta
instances, all extra
fields would either be an array or an object, but not both.
This is all the more curious because the values for extra
in this case are empty!
Actual
In actuality, it appears that the extra
, at least when part of registered_meta
, can be arbitrarily an object or an array, which proves problematic when deserializing the JSON to Java objects.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Hey @emetsger, @msuhovec,
We’ve got a ticket for this issue. It’ll probably in the second post-Django release.
Cheers, @felliott
Also, the field should always be a list. If there’s anything in the list, currently that’s going to be file metadata.