Skip to content
Snippets Groups Projects
Commit e7e34db1 authored by Samuel GAIST's avatar Samuel GAIST Committed by Samuel GAIST
Browse files

[common][fields] Remove JSONSerializerField as DRF already provides such a field

parent e9176816
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !327. Comments created here will be created in the context of that merge request.
......@@ -26,21 +26,7 @@
###############################################################################
from rest_framework import serializers
from django.utils import six
import simplejson
class StringListField(serializers.ListField):
child = serializers.CharField()
class JSONSerializerField(serializers.Field):
""" Serializer for JSONField -- required to make field writable"""
def to_internal_value(self, data):
if isinstance(data, six.string_types):
return simplejson.loads(data)
return data
def to_representation(self, value):
return value
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment