Skip to content

Experimental dataset JSON GET API doesn't return multi-valued fields as arrays #9495

Description

@vera

What steps does it take to reproduce the issue?

  1. Create dataset with multi-valued field, e.g. subject in the citation block
  2. Use experimental GET API to retrieve dataset https://guides.dataverse.org/en/latest/developers/dataset-semantic-metadata-api.html#get-dataset-metadata e.g. GET /api/datasets/42/metadata
  • What happens?

The multi-valued field values are not returned as arrays, e.g. 'subject': 'Medicine, Health and Life Sciences'

Side note, the non-experimental API https://guides.dataverse.org/en/latest/api/native-api.html#get-json-representation-of-a-dataset does not have this bug: {'typeName': 'subject', 'multiple': True, 'typeClass': 'controlledVocabulary', 'value': ['Medicine, Health and Life Sciences']}

  • What did you expect to happen?

The multi-valued field values to be returned as arrays, e.g. 'subject': ['Medicine, Health and Life Sciences']

Which version of Dataverse are you using?

v5.13

Any related open or closed issues to this bug report?

/

Screenshots:

/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    🔍 Interest

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions