I am trying to process somewhat large (possibly up to 200M) JSON files. The structure of the file is basically an array of objects.
So çizgisinde bir şey:
[
{"property":"value", "property2":"value2"},
{"prop":"val"},
...
{"foo":"bar"}
]
Her nesne, rasgele özellikleri vardır ve (olduğu gibi, aynı olan), dizideki diğer nesnelerle gerekli değildir pay bunları yok.
Ben dizideki her bir nesne üzerinde bir işlem uygulamak istediğiniz ve dosya potansiyel büyük olduğu gibi, ben JSON çözme ve PHP dizi yineleme, bellekteki tüm dosya içeriği slurp olamaz.
So ideally I would like to read the file, fetch enough info for each object and process it. A SAX-type approach would be OK if there was a similar library available for JSON.
En iyisi bu sorunla nasıl başa çıkılacağı konusunda herhangi bir öneri?