Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79124 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52142 invoked from network); 24 Nov 2014 13:20:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2014 13:20:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=thruska@cubiclesoft.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=thruska@cubiclesoft.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cubiclesoft.com designates 74.208.222.236 as permitted sender) X-PHP-List-Original-Sender: thruska@cubiclesoft.com X-Host-Fingerprint: 74.208.222.236 u17593298.onlinehome-server.com Received: from [74.208.222.236] ([74.208.222.236:36578] helo=u17593298.onlinehome-server.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/B2-33396-78033745 for ; Mon, 24 Nov 2014 08:20:08 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: thruska@cubiclesoft.com) with ESMTPSA id B965920567 Message-ID: <54732FC2.1000803@cubiclesoft.com> Date: Mon, 24 Nov 2014 06:16:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: PHP Development References: <012701d0074c$ccfe6f40$66fb4dc0$@devtemple.com> <7E8EF92A-6071-4BDA-ADD5-2C2B54AA2DCB@gmail.com> In-Reply-To: <7E8EF92A-6071-4BDA-ADD5-2C2B54AA2DCB@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] enhance fget to accept a callback From: thruska@cubiclesoft.com (Thomas Hruska) 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/