Re: enhance fget to accept a callback

From: Date: Mon, 24 Nov 2014 13:16:50 +0000
Subject: Re: enhance fget to accept a callback
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-79124@lists.php.net to get a copy of this message
On 11/23/2014 2:47 PM, Rowan Collins wrote:
For JSON, newlines aren't the delimiter you want, but with nested structures, I'm not sure how you'd parse a partial structure anyway. Are there JSON equivalents of SAX (event-based) parsers?
If JSON is encoded into another format, newlines can be a valid delimiter. For example, JSON-Base64 uses newlines: http://jb64.org/ JSON-Base64 is more for cross-application support where PHP isn't the only language in the mix. If I'm moving data between two PHP hosts in a migration scenario, I'll tend to use serialize() and Base64 encoding, which preserves PHP objects across the network and requires less effort. -- Thomas Hruska CubicleSoft President I've got great, time saving software that you will find useful. http://cubiclesoft.com/

« previous php.internals (#79124) next »