Deserialize django json data dump one record at the time? -


i`m trying read file json-data, use loads(data) simplejson method , extract create dictionary representing values each column in record, instead of using "standard" or documented way of :

for obj in serializers.deserialize("json", data):     # obj 

because want avoid creating django orm objects each record, want dictionary representing each object can insert database using plain sql gain speed. problem loads(data) needs read data memory , want avoid keep memory usage low , read entry entry in json-data. possible iterator yields data 1 record? , secondly, can skip entire creation of django orm objects when deserializing json data , dictionary of values?

input , thoughts welcome.

thanks time.

if don't want create orm objects, there's no point in using django deserialization methods. load json using underlying simplejson library:

from django.utils import simplejson my_data = simplejson.loads(data) 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -