Created
April 2, 2009 03:14
-
-
Save nickjs/89002 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import <Foundation/CPObject.j> | |
@implementation AppController : CPObject | |
{ | |
} | |
- (void)applicationDidFinishLaunching:(CPNotification)aNotification | |
{ | |
[CPURLConnection connectionWithRequest:[CPURLRequest requestWithURL:@"test.php"] delegate:self]; | |
} | |
- (void)connection:(CPURLConnection)aConnection didReceiveData:(id)data | |
{ | |
var result = CPJSObjectCreateWithJSON(data); | |
console.log(result.data[0]); | |
} | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"data":["{\"reference\": {\n \"type\": \"MAGAZINEARTICLE\",\n \"title\": {\n \"title\": \"The weels on the bus go round and round...\"\n },\n \"author\": [\n {\n \"name\": \"Octavio Paz\"\n },\n {\n \"name\": \"William Shakespare\"\n },\n {\n \"name\": \"Brian Weiss\"\n }\n ],\n \"publisher\": {\n \"name\": \"O'Rally\"\n },\n \"location\": {\n \"nameOfLocation\": \"Paris, Francia\"\n },\n \"pages\": {\n \"pag\": \"1590-2044\"\n },\n \"volume\": {\n \"vol\": \"Vol. 18\"\n },\n \"extra\": \"[1er edicion]\",\n \"metaData\": {\n \"issn\": \"as890\",\n \"isbn\": \"312kl\",\n \"magazineTitle\": \"The importance of wheels\",\n \"language\": \"ENGLISH\",\n \"theme\": \"Mechanics\",\n \"numberOfPages\": 0,\n \"keywords\": \"bus, wheel, round\",\n \"maker\": \"Acrobat Pro\"\n }\n}}","{\"reference\": {\n \"type\": \"MAGAZINEARTICLE\",\n \"title\": {\n \"title\": \"Driving tennis and computing\"\n },\n \"author\": [\n {\n \"name\": \"Michael Shumager\"\n },\n {\n \"name\": \"Ana Kournikova\"\n },\n {\n \"name\": \"Alos\"\n }\n ],\n \"publisher\": {\n \"name\": \"O'Rally\"\n },\n \"location\": {\n \"nameOfLocation\": \"Mexico\"\n },\n \"pages\": {\n \"pag\": \"1590-2044\"\n },\n \"volume\": {\n \"vol\": \"Vol. 18\"\n },\n \"extra\": \"[1er edicion]\",\n \"metaData\": {\n \"issn\": \"as890\",\n \"isbn\": \"312kl\",\n \"magazineTitle\": \"The importance of tennis cars and computers\",\n \"language\": \"ENGLISH\",\n \"theme\": \"Madness\",\n \"numberOfPages\": 0,\n \"keywords\": \"tennis, cars, computers\",\n \"maker\": \"Acrobat Pro\"\n }\n}}"]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment