<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>musicalgeometry &#187; online</title>
	<atom:link href="http://www.musicalgeometry.com/archives/category/online/feed" rel="self" type="application/rss+xml" />
	<link>http://www.musicalgeometry.com</link>
	<description>sound, code, &#38; DIY tech</description>
	<lastBuildDate>Sat, 24 Jul 2010 16:32:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Online JSON Validator</title>
		<link>http://www.musicalgeometry.com/archives/887</link>
		<comments>http://www.musicalgeometry.com/archives/887#comments</comments>
		<pubDate>Wed, 03 Feb 2010 04:44:29 +0000</pubDate>
		<dc:creator>Jason Job</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.musicalgeometry.com/?p=887</guid>
		<description><![CDATA[I was creating some JSON data with PHP to pass to an iPhone app today and I found a great online JSON validation tool: JSONLint: The JSON Validator. Just plunk your JSON string into the window and press the validate button. &#8230; <a href="http://www.musicalgeometry.com/archives/887">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was creating some JSON data with PHP to pass to an iPhone app today and I found a great online JSON validation tool: <a href="http://www.jsonlint.com/">JSONLint: The JSON Validator</a>.</p>
<div id="attachment_888" class="wp-caption alignnone" style="width: 218px"><a href="http://www.musicalgeometry.com/wp-content/uploads/2010/02/jsonvalidate.png"><img class="size-medium wp-image-888 " style="border: 1px solid black;" title="jsonvalidate" src="http://www.musicalgeometry.com/wp-content/uploads/2010/02/jsonvalidate-208x300.png" alt="" width="208" height="300" /></a><p class="wp-caption-text">The JSON Validator</p></div>
<p>Just plunk your JSON string into the window and press the validate button. Voila, not only are you told if your JSON string is valid but it also arranges your JSON data in an easily readable hierarchy. The JSON Validator was made and shared by the good folks at <a href="http://lab.arc90.com/">lab.ac9.com</a>.Thank you arc90!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.musicalgeometry.com/archives/887/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nudge: Online Music Making &amp; Sharing</title>
		<link>http://www.musicalgeometry.com/archives/668</link>
		<comments>http://www.musicalgeometry.com/archives/668#comments</comments>
		<pubDate>Fri, 11 Sep 2009 06:19:58 +0000</pubDate>
		<dc:creator>Jason Job</dc:creator>
				<category><![CDATA[instrument]]></category>
		<category><![CDATA[online]]></category>

		<guid isPermaLink="false">http://www.musicalgeometry.com/?p=668</guid>
		<description><![CDATA[From Hobnox comes Nudge. &#8220;Nudge is a virtual-instrument widget designed for self-expressive online music making &#38; sharing.&#8221; Try it out, right here, right now in your browser. (assuming you have Flash, sorry iPhone users) If you like what you come &#8230; <a href="http://www.musicalgeometry.com/archives/668">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.hobnox.com/index.en.html">Hobnox</a> comes <a href="http://www.inudge.net/index.en.html">Nudge</a>. &#8220;Nudge is a virtual-instrument widget designed for self-expressive online music making &amp; sharing.&#8221; Try it out, right here, right now in your browser. (assuming you have Flash, sorry iPhone users)<br />
<code><br /></code></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="390" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="FlashVars" value="id=13g" /><param name="src" value="http://embed.inudge.net/nudge.swf" /><param name="flashvars" value="id=13g" /><embed type="application/x-shockwave-flash" width="390" height="400" src="http://embed.inudge.net/nudge.swf" flashvars="id=13g" wmode="window"></embed></object><br />
<code><br /></code><br />
If you like what you come up with you can use the &#8216;Get &amp; Share&#8217; button in the top right corner of the widget to email, link, embed or spread your creation.</p>
<p>Also by Hobnox is <a href="http://www.hobnox.com/index.en.html">Audiotool</a>, a music production environment in your browser. Super fun. Be warned, you may loose hours of your life if you follow the links.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.musicalgeometry.com/archives/668/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Retrieving JSON Data In iPhone Apps</title>
		<link>http://www.musicalgeometry.com/archives/571</link>
		<comments>http://www.musicalgeometry.com/archives/571#comments</comments>
		<pubDate>Sat, 15 Aug 2009 04:28:14 +0000</pubDate>
		<dc:creator>Jason Job</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[online]]></category>

		<guid isPermaLink="false">http://www.musicalgeometry.com/?p=571</guid>
		<description><![CDATA[As described at www.json.org, JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate. The JSON format is one of two things; a list &#8230; <a href="http://www.musicalgeometry.com/archives/571">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As described at <a href="http://www.json.org/">www.json.org</a>, JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate. The JSON format is one of two things; a list of name/value pairs that can be realized as an object, record, struct, dictionary, hash table, keyed list, or associative array or an ordered list of values which in most languages is realized as an array, vector, list, or sequence.</p>
<div id="attachment_606" class="wp-caption alignnone" style="width: 170px"><a href="http://www.musicalgeometry.com/wp-content/uploads/2009/08/json160.gif"><img class="size-full wp-image-606 " style="border: 1px solid black;" title="json160" src="http://www.musicalgeometry.com/wp-content/uploads/2009/08/json160.gif" alt="JSON logo" width="160" height="160" /></a><p class="wp-caption-text">JSON logo</p></div>
<p>The JSON format is often used as an alternative to <a href="http://en.wikipedia.org/wiki/XML">XML</a> to transmit structured data over a network, its biggest use being in <a href="http://en.wikipedia.org/wiki/Ajax_(programming)">Ajax</a> web application programming.</p>
<p>Below are instructions for how to retrieve and parse JSON formatted data in an iPhone app.</p>
<p><strong>Adding JSON Framework To Your XCode Project</strong></p>
<p>To use JSON in an iPhone app you first need to download the JSON Framework for Objective-C from its <a href="http://code.google.com/p/json-framework/downloads/list">Google Code page</a>.</p>
<p>When it is downloaded, mount the DMG.</p>
<p>Finally, drag and drop the JSON directory onto the <em>Classes</em> folder icon in the <em>Groups &amp; Files</em> panel in XCode.</p>
<p><strong>Retrieving JSON Data</strong></p>
<p>First of all make sure that you include the JSON.h file in your implementaion(your .m file):</p>
<pre><code>#import "JSON.h"</code></pre>
<p>To retrieve JSON data use an NSURLConnection to issue an HTTP request. To do this you will need an <code>NSMutableData</code> variable to hold the response data. Create it in the interface (.h file) with:</p>
<pre><code>NSMutableData *responseData;</code></pre>
<p>and</p>
<pre><code>@property (nonatomic, retain) NSMutableData *responseData;</code></pre>
<p>and don&#8217;t forget to synthesize in the implementation (.m file):</p>
<pre><code>@synthesize responseData;</code></pre>
<p>Next you need to make an HTTP request with NSURLConnection so start by initializing responseData:</p>
<pre><code>responseData = [[NSMutableData data] retain];</code></pre>
<p>Then make the request:</p>
<pre><code>NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.someurl.com/somefile.json"]];
[[NSURLConnection alloc] initWithRequest:request delegate:self];</code></pre>
<p>Then you need to include the following methods to process the NSURLConnection and save the JSON data into the responseData variable:</p>
<pre><code>- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
	[responseData setLength:0];
}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
	[responseData appendData:data];
}

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
	label.text = [NSString stringWithFormat:@"Connection failed: %@", [error description]];
}</code></pre>
<p><strong>Making Use Of The JSON Data</strong></p>
<p>To make use of the JSON data use the connectionDidFinishLoading: method. Here is an example with some simple error checking:</p>
<pre><code>- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
	[connection release];

	NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
	[responseData release];

	if ([responseString isEqualToString:@"\"Unable to find specified resource.\""]) {
		NSLog(@"Unable to find specified resource.\n");
	} else {
		NSDictionary *dictionary = [responseString JSONValue];
		self.someVariable = [dictionary valueForKey:@"somekey"];
	}
}</code></pre>
<p>In this connectionDidFinishLoading: method you can use any of the key names you know to be in the JSON data to get their values and store them or use them as you need.</p>
<p>Hopefully this helps you to get started using JSON data in your iPhone apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.musicalgeometry.com/archives/571/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PachubeMon Now Available On The App Store</title>
		<link>http://www.musicalgeometry.com/archives/559</link>
		<comments>http://www.musicalgeometry.com/archives/559#comments</comments>
		<pubDate>Fri, 07 Aug 2009 19:41:11 +0000</pubDate>
		<dc:creator>Jason Job</dc:creator>
				<category><![CDATA[app]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[pachube]]></category>
		<category><![CDATA[prototyping]]></category>

		<guid isPermaLink="false">http://www.musicalgeometry.com/?p=559</guid>
		<description><![CDATA[I am happy to announce that my Pachube feed organizer/viewer application PachubeMon is now available as a free download on the App Store. It was also announced on the Pachube blog on Monday. Pachube is a web service available at pachube.com &#8230; <a href="http://www.musicalgeometry.com/archives/559">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.musicalgeometry.com/wp-content/uploads/2009/07/pachubemonitorlogo.jpg"><img class="alignnone size-thumbnail wp-image-483" title="pachubemonitorlogo" src="http://www.musicalgeometry.com/wp-content/uploads/2009/07/pachubemonitorlogo-50x50.jpg" alt="pachubemonitorlogo" width="50" height="50" /></a></p>
<p>I am happy to announce that my Pachube feed organizer/viewer application <a href="http://www.musicalgeometry.com/pachubemon">PachubeMon</a> is now available as a free download on the <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=323811139&amp;mt=8">App Store</a>. It was also announced on the <a href="http://bit.ly/ky74u">Pachube blog</a> on Monday.</p>
<div id="attachment_487" class="wp-caption alignnone" style="width: 218px"><a href="http://www.musicalgeometry.com/wp-content/uploads/2009/07/viewfeed.jpg"><img class="size-medium wp-image-487 " style="border: 1px solid black;" title="viewfeed" src="http://www.musicalgeometry.com/wp-content/uploads/2009/07/viewfeed-208x300.jpg" alt="PachubeMon iPhone app" width="208" height="300" /></a><p class="wp-caption-text">PachubeMon iPhone app</p></div>
<p>Pachube is a web service available at <a href="http://www.pachube.com">pachube.com</a> that enables you to connect, tag and share real time sensor data from objects, devices, buildings and environments around the world.</p>
<p style="text-align: left;">PachubeMon is a utility app for the iPhone that lets you manage and view your Pachube feeds all in one place. The main page allows you to add and remove feeds. By selecting a feed from the list you can view it. You can find feed IDs on the Pachube website <a href="http://www.pachube.com">here</a>.</p>
<p style="text-align: left;">For a fascinating deeper look at Pachube and the concepts around it, check out the amazing article and interview <a href="http://www.ugotrade.com/2009/01/28/pachube-patching-the-planet-interview-with-usman-haque/">here</a>.</p>
<p style="text-align: left;"><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=323811139&amp;mt=8"><img class="alignnone size-full wp-image-619" title="marketing_badge" src="http://www.musicalgeometry.com/wp-content/uploads/2009/08/marketing_badge.png" alt="marketing_badge" width="121" height="41" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.musicalgeometry.com/archives/559/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pachube: The Internet Of Things</title>
		<link>http://www.musicalgeometry.com/archives/434</link>
		<comments>http://www.musicalgeometry.com/archives/434#comments</comments>
		<pubDate>Wed, 01 Jul 2009 06:39:21 +0000</pubDate>
		<dc:creator>Jason Job</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[energy]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[solar]]></category>
		<category><![CDATA[ubiComp]]></category>

		<guid isPermaLink="false">http://www.musicalgeometry.com/?p=434</guid>
		<description><![CDATA[I just found out about Pachube over on the Make: Blog and am feeling really inspired. Pachube is just awesome! It is a service created by HAQUE design + research that &#8220;enables you to connect, tag and share real time &#8230; <a href="http://www.musicalgeometry.com/archives/434">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just found out about <a href="http://www.pachube.com/">Pachube</a> over on the <a href="http://blog.makezine.com/">Make: Blog</a> and am feeling really inspired. Pachube is just awesome! It is a service created by <a href="http://www.haque.co.uk/">HAQUE design + research</a> that &#8220;enables you to connect, tag and share real time sensor data from objects, devices, buildings and environments around the world. The key aim is to facilitate interaction between remote environments, both physical and virtual.&#8221;  Here is a video outlining the service:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/6kzNKONUGQ8&amp;rel=0&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/6kzNKONUGQ8&amp;rel=0&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I have already sent off a request for an invitation to the beta version and am watching my inbox with excitement. I can&#8217;t wait to use an arduino to start logging some data to share online. I would love to track the sun light in my garden or the energy usage in my house or use Pachube as part of a home automation system. Perhaps I will be able to monitor how much time I spend making music versus downsurfing on the interweb!</p>
<p>There is already a convenient way to <a href="http://apps.pachube.com/iphone/">follow peoples Pachube feeds on your iPhone</a> but it might also be interesting to explore the API and create a handy <a href="http://www.musicalgeometry.com/pachubemon">Pachube iPhone app of my own</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.musicalgeometry.com/archives/434/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
