You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The values for the numerical fields are returned as strings, e.g. {'typeName': 'my_int_field', 'multiple': False, 'typeClass': 'primitive', 'value': '5'}
What did you expect to happen?
The numerical fields to be returned as integers/floats, e.g. {'typeName': 'my_int_field', 'multiple': False, 'typeClass': 'primitive', 'value': 5}
Which version of Dataverse are you using?
v5.13
Any related open or closed issues to this bug report?
/
Screenshots:
/
The text was updated successfully, but these errors were encountered:
FWIW: This wouldn't be hard to change (I think the code is all in util.JsonPrinter) but there would be many places where that format is used that would have to change - most of the metadata exporters parse that JSON, previewers and external tools use it, probably pyDataverse, community-developed applications, and we expect to be able to read that format back in, so all of the code to import the Json could have to be changed to accept this (hopefully keeping backward compatibility as well). I know some JSON APIs will work as long as the value can be converted to the requested type, but I think there are a lot of places where a change like this could have an effect.
There is some discussion going on w.r.t. using a JSON Schema (e.g. in #9463) which could involve changes to the JSON output that would be significant enough to perhaps be a version 2 of the API and where changes like this might be something to incorporate.
What steps does it take to reproduce the issue?
fieldType
int
orfloat
GET /api/datasets/42?exporter=dataverse_json
The values for the numerical fields are returned as strings, e.g.
{'typeName': 'my_int_field', 'multiple': False, 'typeClass': 'primitive', 'value': '5'}
The numerical fields to be returned as integers/floats, e.g.
{'typeName': 'my_int_field', 'multiple': False, 'typeClass': 'primitive', 'value': 5}
Which version of Dataverse are you using?
v5.13
Any related open or closed issues to this bug report?
/
Screenshots:
/
The text was updated successfully, but these errors were encountered: