<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: BISON: Binary JSON</title>
	<atom:link href="http://ajaxian.com/archives/bison-binary-json/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/bison-binary-json</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: chris holland</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-250852</link>
		<dc:creator>chris holland</dc:creator>
		<pubDate>Fri, 25 May 2007 13:57:46 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-250852</guid>
		<description>typos: s/user/user-agent/  s/well/will</description>
		<content:encoded><![CDATA[<p>typos: s/user/user-agent/  s/well/will</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris holland</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-250851</link>
		<dc:creator>chris holland</dc:creator>
		<pubDate>Fri, 25 May 2007 13:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-250851</guid>
		<description>if you&#039;re sending JSON from server to client, the HTTP/gzip encoding mechanism should give you good additional compression without having to resort to compressing the data in script-land. HTTP/gzip&#039;s been around for ages, all browsers support it, thru proper handshaking:

- if a user supports gzip, it well send an Accept-Encoding: gzip http header in every http request to a server.

- if a server chooses to gzip the payload it sends back to the client, it MUST also send a Content-Encoding: gzip header.</description>
		<content:encoded><![CDATA[<p>if you&#8217;re sending JSON from server to client, the HTTP/gzip encoding mechanism should give you good additional compression without having to resort to compressing the data in script-land. HTTP/gzip&#8217;s been around for ages, all browsers support it, thru proper handshaking:</p>
<p>- if a user supports gzip, it well send an Accept-Encoding: gzip http header in every http request to a server.</p>
<p>- if a server chooses to gzip the payload it sends back to the client, it MUST also send a Content-Encoding: gzip header.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ajaxianer</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247210</link>
		<dc:creator>ajaxianer</dc:creator>
		<pubDate>Wed, 14 Feb 2007 17:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247210</guid>
		<description>anyway...DOJO IS slow and browser-unsafe....just my 2 cent</description>
		<content:encoded><![CDATA[<p>anyway&#8230;DOJO IS slow and browser-unsafe&#8230;.just my 2 cent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Trenka</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247194</link>
		<dc:creator>Tom Trenka</dc:creator>
		<pubDate>Wed, 14 Feb 2007 15:01:58 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247194</guid>
		<description>Wow!  What an ass you are!  Don&#039;t you think that if I&#039;d implemented gzip with Dojo it would be a part of the toolkit by now?  The app I was referring to was an internal IE-only application that I worked on in 2003, long before Dojo was in existence.  Don&#039;t look down now but your ignorance is open.</description>
		<content:encoded><![CDATA[<p>Wow!  What an ass you are!  Don&#8217;t you think that if I&#8217;d implemented gzip with Dojo it would be a part of the toolkit by now?  The app I was referring to was an internal IE-only application that I worked on in 2003, long before Dojo was in existence.  Don&#8217;t look down now but your ignorance is open.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: handcoder</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247188</link>
		<dc:creator>handcoder</dc:creator>
		<pubDate>Wed, 14 Feb 2007 13:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247188</guid>
		<description>&quot;(ironically enough, the gzip was actually quite fast; it was the rest of the app that was slow)&quot;

maybe coz u use this stupid and terrible slow DOJOTOOLKIT? kick this shit out of your app and it will be fast like hell!</description>
		<content:encoded><![CDATA[<p>&#8220;(ironically enough, the gzip was actually quite fast; it was the rest of the app that was slow)&#8221;</p>
<p>maybe coz u use this stupid and terrible slow DOJOTOOLKIT? kick this shit out of your app and it will be fast like hell!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Trenka</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247154</link>
		<dc:creator>Tom Trenka</dc:creator>
		<pubDate>Tue, 13 Feb 2007 14:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247154</guid>
		<description>I actually *have* implemented a gzip control on a client (not in pure JS though I do have the start of that laying around somewhere, it&#039;s been a while); it was an IE-only intranet application based on passing XML documents from the client to the server and back (not my idea) and because of not-so-careful planning, the size of said documents were pushing the 4MB POST limit (obviously not using multipart).The experience was...um...not the most satisfying.  While the size of the packets being sent back and forth were greatly reduced (a 4MB XML file was reduced to around 220k after gzipped and base64 encoded) the fact of the matter is that the browser is really not the best platform to be sending and decoding text of that size.  The app in question was *slow* because of this (ironically enough, the gzip was actually quite fast; it was the rest of the app that was slow).</description>
		<content:encoded><![CDATA[<p>I actually *have* implemented a gzip control on a client (not in pure JS though I do have the start of that laying around somewhere, it&#8217;s been a while); it was an IE-only intranet application based on passing XML documents from the client to the server and back (not my idea) and because of not-so-careful planning, the size of said documents were pushing the 4MB POST limit (obviously not using multipart).The experience was&#8230;um&#8230;not the most satisfying.  While the size of the packets being sent back and forth were greatly reduced (a 4MB XML file was reduced to around 220k after gzipped and base64 encoded) the fact of the matter is that the browser is really not the best platform to be sending and decoding text of that size.  The app in question was *slow* because of this (ironically enough, the gzip was actually quite fast; it was the rest of the app that was slow).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Schiller</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247147</link>
		<dc:creator>Scott Schiller</dc:creator>
		<pubDate>Mon, 12 Feb 2007 23:43:07 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247147</guid>
		<description>Kristoffer: I was meaning sending gzipped (or otherwise-compressed) data from the client, from the browser (submitting large amounts of text, for example, comes to mind.) Assuming there would be some bandwidth savings, this might be an interesting area to explore.</description>
		<content:encoded><![CDATA[<p>Kristoffer: I was meaning sending gzipped (or otherwise-compressed) data from the client, from the browser (submitting large amounts of text, for example, comes to mind.) Assuming there would be some bandwidth savings, this might be an interesting area to explore.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247146</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Mon, 12 Feb 2007 22:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247146</guid>
		<description>One thing that author came close to is the idea of obfuscating JSON so it become bit more difficult to reverse engineer.</description>
		<content:encoded><![CDATA[<p>One thing that author came close to is the idea of obfuscating JSON so it become bit more difficult to reverse engineer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kristoffer</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247141</link>
		<dc:creator>Kristoffer</dc:creator>
		<pubDate>Mon, 12 Feb 2007 21:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247141</guid>
		<description>I dont think there is a need to implement gzip in javascript. That will be taken care of by the browser before the data reaches the javascript. If the browser supports gzip that is. And since all modern browser do support gzip there is no problem in sending json gziped.</description>
		<content:encoded><![CDATA[<p>I dont think there is a need to implement gzip in javascript. That will be taken care of by the browser before the data reaches the javascript. If the browser supports gzip that is. And since all modern browser do support gzip there is no problem in sending json gziped.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Schiller</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247139</link>
		<dc:creator>Scott Schiller</dc:creator>
		<pubDate>Mon, 12 Feb 2007 19:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247139</guid>
		<description>Peter: File size is a consideration, and presumably processing time (to gzip client-side) as well. Of course, paradoxically, the client-side gzip code could itself be gzipped for fast download to the client. ;)</description>
		<content:encoded><![CDATA[<p>Peter: File size is a consideration, and presumably processing time (to gzip client-side) as well. Of course, paradoxically, the client-side gzip code could itself be gzipped for fast download to the client. ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Michaux</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247138</link>
		<dc:creator>Peter Michaux</dc:creator>
		<pubDate>Mon, 12 Feb 2007 18:28:58 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247138</guid>
		<description>Theo: That is an interesting idea about implementing gzip in JavaScript. I can&#039;t think of any time I would have needed that but it would be an interesting experiment for sure. The savings would need to override the library download.</description>
		<content:encoded><![CDATA[<p>Theo: That is an interesting idea about implementing gzip in JavaScript. I can&#8217;t think of any time I would have needed that but it would be an interesting experiment for sure. The savings would need to override the library download.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theo</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247136</link>
		<dc:creator>Theo</dc:creator>
		<pubDate>Mon, 12 Feb 2007 17:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247136</guid>
		<description>I was going to ask how BISON compares to gzipp&#039;ed JSON, but after reading the other comments I understand that BISON isn&#039;t actually producing smaller content anyway.

It was probably a fun exercise, but gzipp&#039;ed JSON wins hands down. If one he had implemented gzip in JavaScript instead we could send JSON from the client too, instead of only from the server.</description>
		<content:encoded><![CDATA[<p>I was going to ask how BISON compares to gzipp&#8217;ed JSON, but after reading the other comments I understand that BISON isn&#8217;t actually producing smaller content anyway.</p>
<p>It was probably a fun exercise, but gzipp&#8217;ed JSON wins hands down. If one he had implemented gzip in JavaScript instead we could send JSON from the client too, instead of only from the server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamerquai</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247135</link>
		<dc:creator>Jamerquai</dc:creator>
		<pubDate>Mon, 12 Feb 2007 17:24:33 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247135</guid>
		<description>When I encoded the JSON text without whitespace as

{info:&quot;Hello, I&#039;m an object&quot;,randomNumbers:[9,53,46,12,6,33,59,28],PI:3.14159265,nestedObject:{anotherNestedObject:{yetAnotherNestedObject:{color:&quot;Blue&quot;,width:32,height:90}},someArray:[1,4,true,&quot;Hello World&quot;,[2,3,4,5],{member:&quot;value&quot;}]}}

it is 237 bytes in size.

When I fed this JSON to Bison.serialize() it produced a 227 byte string.

Why would anyone use this BISON protocol to save only 4% in data transfered?</description>
		<content:encoded><![CDATA[<p>When I encoded the JSON text without whitespace as</p>
<p>{info:&#8221;Hello, I&#8217;m an object&#8221;,randomNumbers:[9,53,46,12,6,33,59,28],PI:3.14159265,nestedObject:{anotherNestedObject:{yetAnotherNestedObject:{color:&#8221;Blue&#8221;,width:32,height:90}},someArray:[1,4,true,"Hello World",[2,3,4,5],{member:&#8221;value&#8221;}]}}</p>
<p>it is 237 bytes in size.</p>
<p>When I fed this JSON to Bison.serialize() it produced a 227 byte string.</p>
<p>Why would anyone use this BISON protocol to save only 4% in data transfered?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea Giammarchi</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247134</link>
		<dc:creator>Andrea Giammarchi</dc:creator>
		<pubDate>Mon, 12 Feb 2007 17:18:23 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247134</guid>
		<description>oops ... I meant ... &quot;this simple workaround&quot; (... maybe)
&lt;code&gt;
function BisonSafeArray(arr){
	for(var	i = 0, j = arr.length, tmp = new Array(j); i &lt; j; i++)
		tmp[i] = arr[i];
	return tmp;
};
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>oops &#8230; I meant &#8230; &#8220;this simple workaround&#8221; (&#8230; maybe)<br />
<code><br />
function BisonSafeArray(arr){<br />
	for(var	i = 0, j = arr.length, tmp = new Array(j); i &lt; j; i++)<br />
		tmp[i] = arr[i];<br />
	return tmp;<br />
};<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea Giammarchi</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247133</link>
		<dc:creator>Andrea Giammarchi</dc:creator>
		<pubDate>Mon, 12 Feb 2007 17:16:29 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247133</guid>
		<description>It seems a good experiment, but if sent string size is the same of a generic JSONotation, I suppose that serialize/deserialize computation time is not &quot;so interesting&quot; as experiment itself.

P.S. I don&#039;t understand very well Array limitations (ordered ... why ? ... obj = []; obj[1] = true; obj[0] = true; ... fails your check) ... however, this is a simple workaround.
&lt;code&gt;function BSONSafeArray(arr){
	for(var	i = 0, j = arr.length, tmp = new Array(j); i &lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>It seems a good experiment, but if sent string size is the same of a generic JSONotation, I suppose that serialize/deserialize computation time is not &#8220;so interesting&#8221; as experiment itself.</p>
<p>P.S. I don&#8217;t understand very well Array limitations (ordered &#8230; why ? &#8230; obj = []; obj[1] = true; obj[0] = true; &#8230; fails your check) &#8230; however, this is a simple workaround.<br />
<code>function BSONSafeArray(arr){<br />
	for(var	i = 0, j = arr.length, tmp = new Array(j); i </code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl G</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247131</link>
		<dc:creator>Karl G</dc:creator>
		<pubDate>Mon, 12 Feb 2007 16:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247131</guid>
		<description>&lt;blockquote&gt;The XMLHttpRquest object&#039;s send method automatically applies utf-8 encoding to anything it sends. This may be fine for text messages, but what I was sending wasn&#039;t exactly text. Now utf-8 encoding will encode characters with a numeric represtation that is larger than 128 with anything between two and four bytes. Meaning that when I was thinking I had sent a single byte, I might have actually sent four. Now this problem I could not yet circumvent and while sending and receiving works just fine, the messages are a lot bigger than they have to be. Typically they&#039;re about the same size as a JSON message but sometimes they&#039;re also bigger.&lt;/blockquote&gt;

So... binary about the same size as plaintext. Cool hack but doesn&#039;t really come off as a net win for me.

There&#039;s an effort to binary encode XML in the w3c&#039;s &lt;a href=&quot;http://www.w3.org/XML/EXI/&quot; rel=&quot;nofollow&quot;&gt;Efficient XML&lt;/a&gt; workgroup.</description>
		<content:encoded><![CDATA[<blockquote><p>The XMLHttpRquest object&#8217;s send method automatically applies utf-8 encoding to anything it sends. This may be fine for text messages, but what I was sending wasn&#8217;t exactly text. Now utf-8 encoding will encode characters with a numeric represtation that is larger than 128 with anything between two and four bytes. Meaning that when I was thinking I had sent a single byte, I might have actually sent four. Now this problem I could not yet circumvent and while sending and receiving works just fine, the messages are a lot bigger than they have to be. Typically they&#8217;re about the same size as a JSON message but sometimes they&#8217;re also bigger.</p></blockquote>
<p>So&#8230; binary about the same size as plaintext. Cool hack but doesn&#8217;t really come off as a net win for me.</p>
<p>There&#8217;s an effort to binary encode XML in the w3c&#8217;s <a href="http://www.w3.org/XML/EXI/" rel="nofollow">Efficient XML</a> workgroup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamerquai</title>
		<link>http://ajaxian.com/archives/bison-binary-json/comment-page-1#comment-247130</link>
		<dc:creator>Jamerquai</dc:creator>
		<pubDate>Mon, 12 Feb 2007 16:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2109#comment-247130</guid>
		<description>BISON is the GNU version of Yacc. Hopefully he&#039;ll change the name of Binary JSON to &quot;BSON&quot;.</description>
		<content:encoded><![CDATA[<p>BISON is the GNU version of Yacc. Hopefully he&#8217;ll change the name of Binary JSON to &#8220;BSON&#8221;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

