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

Implement validation, serialization, and deserialization using Marshmallow

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • 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.

              People

              • Assignee:
                afausti Angelo Fausti
                Reporter:
                afausti Angelo Fausti
                Watchers:
                Angelo Fausti
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel