Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-12192

Implement validation, serialization, and deserialization using Marshmallow

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      During DM-10742 we tried to upgrade django to a newer version (1.11.3) and faced the problem that the django-json-field 0.5.7 package does not work with this version when it does the deserialization of JSON data.

      We have to look for alternatives for this package and perhaps write a serializer/deserializer by ourserlves. Also this package is not being maintained anymore.

        Attachments

          Issue Links

            Activity

            Hide
            afausti Angelo Fausti added a comment - - edited

            See issue:
            https://github.com/adamchainz/django-mysql/issues/342

            The lack of support for JSON field in Django and MariaDB is one of the reasons we want to migrate the SQuaSH API to Flask + SQLAlchemy. We are looking into https://marshmallow.readthedocs.io/en/latest/index.html# for the new implementation.

            The result of this investigation should be a proof of concept to demonstrate that we can use MariaDB 10.2 JSON field support with Flask + SQLAlchemy.

            Show
            afausti Angelo Fausti added a comment - - edited See issue: https://github.com/adamchainz/django-mysql/issues/342 The lack of support for JSON field in Django and MariaDB is one of the reasons we want to migrate the SQuaSH API to Flask + SQLAlchemy. We are looking into https://marshmallow.readthedocs.io/en/latest/index.html# for the new implementation. The result of this investigation should be a proof of concept to demonstrate that we can use MariaDB 10.2 JSON field support with Flask + SQLAlchemy.
            Hide
            afausti Angelo Fausti added a comment -

            We are using request parser to for validation of the request parameters and request body and it seems enough for now, see work on DM-9741. Thus I am moving this one to the backlog.

            Show
            afausti Angelo Fausti added a comment - We are using request parser to for validation of the request parameters and request body and it seems enough for now, see work on DM-9741 . Thus I am moving this one to the backlog.
            Hide
            afausti Angelo Fausti added a comment -

            See also https://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful on how to use fields and marshal function to improve the current implementation based on reqparse.

            Show
            afausti Angelo Fausti added a comment - See also https://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful  on how to use fields  and marshal  function to improve the current implementation based on reqparse.
            Hide
            tjenness Tim Jenness added a comment -

            Angelo Fausti is this ticket still relevant or should it be closed?

            Show
            tjenness Tim Jenness added a comment - Angelo Fausti is this ticket still relevant or should it be closed?
            Hide
            afausti Angelo Fausti added a comment -

            It is not relevant anymore, the plan is move to FastAPI and use Pydantic models instead.

            PS.: I probably have a bunch of tickets like this one that became obsolete, I'll go over my backlog epic and review them.

            Show
            afausti Angelo Fausti added a comment - It is not relevant anymore, the plan is move to FastAPI and use Pydantic models instead. PS.: I probably have a bunch of tickets like this one that became obsolete, I'll go over my backlog epic and review them.

              People

              Assignee:
              afausti Angelo Fausti
              Reporter:
              afausti Angelo Fausti
              Watchers:
              Angelo Fausti, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.