Hi Kev,
I’ve been playing with this myself. There may be specific issues that come up but, at least for simple cases like that from the docs:
tags = ArrayField(models.CharField(max_length=200), blank=True)
… it should Just Work™.
By default DRF 3.0 will map the above field to a `ModelField`:
tags = ModelField(model_field=<django.contrib.postgres.fields.array.ArrayField: tags>, required=False)
This will just pass whatever data it’s given through to the ArrayField’s `to_python` — which will just set it as the value.
So assuming your data looks something like:
{
…
“tags”: [“fruit”, “veggies”, “nuts”],
…
}
... you’ll end up with the dict you need being set on the model instance.
(I could imagine a set of validators being a worthwhile investment.)
All I can say at this point is, give it a run. If there are particular areas where you get stuck come back to the list. (If there’s a clear case that you think should be handled but isn’t perhaps the issue tracker.)
Kind Regards,
Carlton