Skip to content

Python tuples fail to validate as Json lists #94

@micpalmia

Description

@micpalmia

We are using @schema.validate on our controllers.
A property defined as

"properties": {
  "probability_list": {
    "type": "array"
  }
}

will unfortunately fail in case a Python tuple is passed instead of a list. json.dumps will always transform Python tuples to list, so I don't see why validate should raise an exception on encountering a tuple.

Any insight on how to solve this without having to transform all of my tuples into list before outputting them?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions