1

Using python wrapper for AWS S3 upload, i want to save a key object in the django models. Using PickledObjectField to store that key object in my model, On saving it says:

Key is not JSON serializable

i have tried by passing key object as json.loads(key_obj) , but got same error.

navyad
  • 3,752
  • 7
  • 47
  • 88

1 Answers1

1

There are many ways to achieve this. But the basic idea is that you need to create your own json serializer for boto.s3.key.Key. I will leave it for you to choose the methods and the implementation details. Let me know if you still stuck with the implementation.

Community
  • 1
  • 1
Yeo
  • 11,416
  • 6
  • 63
  • 90