omething you have to watch out for since it can lead to data
> loss.
>
> >>> import json
> >>> test = {4: 5, '4': 'a'}
> >>> json.loads(json.dumps(test))
> {'4': 5}
>
> On Apr 24, 2018, at 6:06 PM, Oliver Zhou > wr
hen retrieved from the database.
>
> Cheers,
> Simon
>
> [0]
> https://stackoverflow.com/questions/9304528/why-json-allows-only-string-to-be-a-key#9304820
>
> Le mardi 24 avril 2018 20:21:13 UTC-4, Oliver Zhou a écrit :
>>
>> Using Django 1.11, Python 2.7, PostG
Using Django 1.11, Python 2.7, PostGres, and JSONField I'm getting behavior
I don't expect.
It seems when JSONField values are initially saved/accessed in memory,
they're python "integers", but when saved to the database and then
re-accessed, the values are now in string format.
*What about ho
Using Django 1.11, Python 2.7, PostGres, and JSONField I'm getting behavior
I don't expect.
It seems when JSONField values are initially saved/accessed in memory,
they're python "integers", but when saved to the database and then
re-accessed, the values are now in string format.
*What about ho
4 matches
Mail list logo