michaelfox + json 34
Opens3 by Pablo-Merino
5 weeks ago by michaelfox
OpenS3 is basically a storage server. What it does is provide a JSON API to upload and download files to a specified path. It includes a bucket feature to organize uploads.
Details!
Uses Thin as HTTP server and rack for interacting with it. For uploading, listing and downloading files you'll need a token, which is a SHA512 of a string you choose. You'll also need to set an expiry time for a link when downloading.
backup
s3
cloud
file
server
json
ruby
storage
aws
github
opensource
repo
Details!
Uses Thin as HTTP server and rack for interacting with it. For uploading, listing and downloading files you'll need a token, which is a SHA512 of a string you choose. You'll also need to set an expiry time for a link when downloading.
5 weeks ago by michaelfox
trentm/json - GitHub
january 2012 by michaelfox
We can then print a table with just some fields as follows:
command
curl
json
shell
tools
github
github-repo
january 2012 by michaelfox
jLinq
april 2011 by michaelfox
jLinq is a 100% JavaScript library that allows you to perform complex queries on arrays of JSON data.
Instead of using for loops and if statements, you can write fluent queries to filter, sort and select the information you need.
Plus jLinq extensible so you can create your own functions and plug them straight into the library.
javascript
library
json
mapreduce
Instead of using for loops and if statements, you can write fluent queries to filter, sort and select the information you need.
Plus jLinq extensible so you can create your own functions and plug them straight into the library.
april 2011 by michaelfox
JSend
march 2011 by michaelfox
What? - Put simply, JSend is a specification that lays down some rules for how JSON responses from web servers should be formatted. JSend focuses on application-level (as opposed to protocol- or transport-level) messaging which makes it ideal for use in REST-style applications and APIs.
Why? - There are lots of web services out there providing JSON data, and each has its own way of formatting responses. Also, developers writing for JavaScript? front-ends continually re-invent the wheel on communicating data from their servers. While there are many common patterns for structuring this data, there is no consistency in things like naming or types of responses. Also, this helps promote happiness and unity between backend developers and frontend designers, as everyone can come to expect a common approach to interacting with one another.
Hold on now, aren't there already specs for this kind of thing? - Well... no. While there are a few handy specifications for dealing with JSON data, most notably Douglas Crockford's JSONRequest proposal, there's nothing to address the problems of general application-level messaging. More on this later.
(Why) Should I care? - If you're a library or framework developer, this gives you a consistent format which your users are more likely to already be familiar with, which means they'll already know how to consume and interact with your code. If you're a web app developer, you won't have to think about how to structure the JSON data in your application, and you'll have existing reference implementations to get you up and running quickly.
jsend
json
ajax
javascript
spec
standards
http
Why? - There are lots of web services out there providing JSON data, and each has its own way of formatting responses. Also, developers writing for JavaScript? front-ends continually re-invent the wheel on communicating data from their servers. While there are many common patterns for structuring this data, there is no consistency in things like naming or types of responses. Also, this helps promote happiness and unity between backend developers and frontend designers, as everyone can come to expect a common approach to interacting with one another.
Hold on now, aren't there already specs for this kind of thing? - Well... no. While there are a few handy specifications for dealing with JSON data, most notably Douglas Crockford's JSONRequest proposal, there's nothing to address the problems of general application-level messaging. More on this later.
(Why) Should I care? - If you're a library or framework developer, this gives you a consistent format which your users are more likely to already be familiar with, which means they'll already know how to consume and interact with your code. If you're a web app developer, you won't have to think about how to structure the JSON data in your application, and you'll have existing reference implementations to get you up and running quickly.
march 2011 by michaelfox
probablycorey/seriously - GitHub
december 2010 by michaelfox
The Objective-C HTTP library that Apple should have created, seriously.
Seriously
---------
The iPhone needs a better way to make HTTP requests, specifically calls to
REST web services. Seriously mixes Blocks with NSURLConnection &
NSOperationQueue to do just that. It also will automatically parse the JSON
response into a dictionary if the response headers are set correctly.
Install
-------
Just drag the files from the "src" directory into your project. You can also try
using the included "Seriously.framework" file
Parse JSON EXAMPLE
------------------
NSString *url = @"http://api.twitter.com/1/users/show.json?screen_name=probablycorey;"
[Seriously get:url handler:^(id body, NSHTTPURLResponse *response, NSError *error) {
if (error) {
NSLog(@"Error: %@", error);
}
else {
NSLog(@"Look, JSON is parsed into a dictionary!");
NSLog(@"%@", [body objectForKey:@"profile_background_image_url"]);
}
}];
Simple Queue Example
--------------------
NSArray *urls = [NSArray arrayWithObjects:
@"http://farm5.static.flickr.com/4138/4744205956_1f08ae40e3_o.jpg",
@"http://farm5.static.flickr.com/4123/4744238252_d11d0df5a3_b.jpg",
@"http://farm5.static.flickr.com/4097/4743596319_50cce97d80_o.jpg",
@"http://farm5.static.flickr.com/4099/4743581287_7c50529b36_o.jpg",
@"http://farm5.static.flickr.com/4123/4743587437_78f0906e8a_o.jpg",
@"http://farm5.static.flickr.com/4136/4743562971_d5f5c6d5b1_o.jpg",
@"http://farm5.static.flickr.com/4073/4744205142_be44e64ab7_o.jpg",
nil];
// By default the NSOperation will only do 3 requests at a time
for (NSString *url in urls) {
NSOperation *o = [Seriously request:url options:nil handler:^(id body,
NSHTTPURLResponse *response, NSError *error) {
NSLog(@"got %d (%@)", [urls indexOfObject:url], url);
}];
}
Why Are You Using Blocks?
-------------------------
Welcome to the future dude!
TODO
----
- Document
- Add XML parsing
- Add more options for NSOperationQueue management
cocoa
http
ios
iphone
ipad
objective-c
rest
request
json
library
resources
Seriously
---------
The iPhone needs a better way to make HTTP requests, specifically calls to
REST web services. Seriously mixes Blocks with NSURLConnection &
NSOperationQueue to do just that. It also will automatically parse the JSON
response into a dictionary if the response headers are set correctly.
Install
-------
Just drag the files from the "src" directory into your project. You can also try
using the included "Seriously.framework" file
Parse JSON EXAMPLE
------------------
NSString *url = @"http://api.twitter.com/1/users/show.json?screen_name=probablycorey;"
[Seriously get:url handler:^(id body, NSHTTPURLResponse *response, NSError *error) {
if (error) {
NSLog(@"Error: %@", error);
}
else {
NSLog(@"Look, JSON is parsed into a dictionary!");
NSLog(@"%@", [body objectForKey:@"profile_background_image_url"]);
}
}];
Simple Queue Example
--------------------
NSArray *urls = [NSArray arrayWithObjects:
@"http://farm5.static.flickr.com/4138/4744205956_1f08ae40e3_o.jpg",
@"http://farm5.static.flickr.com/4123/4744238252_d11d0df5a3_b.jpg",
@"http://farm5.static.flickr.com/4097/4743596319_50cce97d80_o.jpg",
@"http://farm5.static.flickr.com/4099/4743581287_7c50529b36_o.jpg",
@"http://farm5.static.flickr.com/4123/4743587437_78f0906e8a_o.jpg",
@"http://farm5.static.flickr.com/4136/4743562971_d5f5c6d5b1_o.jpg",
@"http://farm5.static.flickr.com/4073/4744205142_be44e64ab7_o.jpg",
nil];
// By default the NSOperation will only do 3 requests at a time
for (NSString *url in urls) {
NSOperation *o = [Seriously request:url options:nil handler:^(id body,
NSHTTPURLResponse *response, NSError *error) {
NSLog(@"got %d (%@)", [urls indexOfObject:url], url);
}];
}
Why Are You Using Blocks?
-------------------------
Welcome to the future dude!
TODO
----
- Document
- Add XML parsing
- Add more options for NSOperationQueue management
december 2010 by michaelfox
Adding buttons to JQGrid toolbar « SANDBOX…….
october 2010 by michaelfox
As I have wrote in my previous article, JQGrid is one of the most powerful JQuery plug-ins used in creation of grids. Though JQGrid provides most of the functionality out of box, there are certain things for which we might need to extend. I came across one such requirement a week before.
JQGrid add buttons, like search to the navigator (pager) component. This navigator component is placed below the table. As far as user experience (UE) is considered action items needs to be placed at the top of the grid for easier accessibility (and many other reasons, which I am not much aware of, comment if you are). So I started to dig in to JQGrid documents and source to achieve this. During this time, Rama pointed me about the toolbar option. But there is no API in JQGrid to add buttons with the same look and feel as navigator buttons in toolbar (readers comment if you find any). This gave me a chance to extend JQGrid plug-in for this functionality. With sometime over the weekend, I am able to achieve the same. Here, I share the code with you
jquery
jqgrid
grid
json
data
table
toolbar
JQGrid add buttons, like search to the navigator (pager) component. This navigator component is placed below the table. As far as user experience (UE) is considered action items needs to be placed at the top of the grid for easier accessibility (and many other reasons, which I am not much aware of, comment if you are). So I started to dig in to JQGrid documents and source to achieve this. During this time, Rama pointed me about the toolbar option. But there is no API in JQGrid to add buttons with the same look and feel as navigator buttons in toolbar (readers comment if you find any). This gave me a chance to extend JQGrid plug-in for this functionality. With sometime over the weekend, I am able to achieve the same. Here, I share the code with you
october 2010 by michaelfox
JSON Configuration for JavaScript - Opera Developer Community
august 2010 by michaelfox
In the early days (well, about 4 or 5 years ago in web terms) JavaScript was mainly the preserve of the web developer/designer. For all but the most forward thinking, the approach taken when a little client side interactivity was required was to jump on to the web, find a suitable script and copy, paste and hack it to your needs. Then along came Ajax, progressive enhancement and a bunch of libraries and how things have changed. We're now making much more use of JavaScript in complex - often bespoke - ways, in our sites and applications. This new emphasis means more people with a programmer mentality are starting to do more complicated things with JavaScript. We're starting to see talk of JavaScript patterns, meta programming and domain specific languages and prototypal inheritance. All of this just might be too much for the interaction designer who just wants to improve the user experience of the application.
In order to work efficiently in a multi-disciplinary environments, and to create good reusable code, you need to include some well thought out abstractions in your applications. If you're a JavaScript developer this abstraction might take the form of using a library such as Dojo or JQuery. If you're a web designer working with a development team this might mean using JSON for application configuration details, which is what this article is about.
The core idea is to move out of our central code base things that might change depending on the context of use - such as element ids, URLs or image names - and put them in an external configuration declaration. This way the web designer can tell the program what to do without changing (and maybe breaking) it's internals. This also allows the JavaScript programmer to refactor the underlying code as required, as long as it maintains the same interface and variable names. Below I'll quickly run through what JSON is and then go through a short example, to give you a more solid idea of what I'm on about.
ajax
javascript
json
In order to work efficiently in a multi-disciplinary environments, and to create good reusable code, you need to include some well thought out abstractions in your applications. If you're a JavaScript developer this abstraction might take the form of using a library such as Dojo or JQuery. If you're a web designer working with a development team this might mean using JSON for application configuration details, which is what this article is about.
The core idea is to move out of our central code base things that might change depending on the context of use - such as element ids, URLs or image names - and put them in an external configuration declaration. This way the web designer can tell the program what to do without changing (and maybe breaking) it's internals. This also allows the JavaScript programmer to refactor the underlying code as required, as long as it maintains the same interface and variable names. Below I'll quickly run through what JSON is and then go through a short example, to give you a more solid idea of what I'm on about.
august 2010 by michaelfox
Create a Content Rich Tooltip with JSON and jQuery | Web Resources | WebAppers
july 2009 by michaelfox
This tutorial will demonstrate how to build tooltips that are powered by jQuery, with information pulled from a JSON array.
jquery
tooltips
toread
JSON
july 2009 by michaelfox
JSON Formatter (& Validator!)
june 2009 by michaelfox
The JSON Formatter (& Validator!) helps debugging JSON data by formatting the JSON into data that is easily readable by human beings.
JSON
javascript
webdev
tools
programming
web
validation
formatter
validator
format
june 2009 by michaelfox
related tags
*download ⊕ about ⊕ ajax ⊕ algorithms ⊕ apache ⊕ api ⊕ app ⊕ awk ⊕ aws ⊕ backup ⊕ bookmarklet ⊕ canvas ⊕ charset ⊕ chart ⊕ cli ⊕ cloud ⊕ cocoa ⊕ code ⊕ codeigniter ⊕ command ⊕ compare ⊕ comparison ⊕ countries ⊕ curl ⊕ data ⊕ database ⊕ datavisualization ⊕ debug ⊕ design ⊕ development ⊕ diff ⊕ dojo ⊕ DOM ⊕ editor ⊕ encoding ⊕ environment ⊕ extension ⊕ file ⊕ firefox ⊕ format ⊕ formatter ⊕ framework ⊕ github ⊕ github-repo ⊕ graph ⊕ graphics ⊕ grid ⊕ html ⊕ http ⊕ interface ⊕ ios ⊕ ipad ⊕ iphone ⊕ javascript ⊕ jqgrid ⊕ jquery ⊕ jsawk ⊕ jsend ⊕ json ⊖ jsonrpc ⊕ json_encode ⊕ library ⊕ mac ⊕ mapreduce ⊕ meta ⊕ model ⊕ mysql ⊕ nodejs ⊕ objective-c ⊕ objectivec ⊕ opensource ⊕ osx ⊕ parse ⊕ php ⊕ programming ⊕ reference ⊕ repo ⊕ request ⊕ resources ⊕ rest ⊕ restful ⊕ ruby ⊕ s3 ⊕ screencast ⊕ scripting ⊕ search ⊕ seo ⊕ server ⊕ shell ⊕ spec ⊕ specification ⊕ standards ⊕ storage ⊕ table ⊕ testing ⊕ textmate ⊕ toolbar ⊕ toolkit ⊕ tools ⊕ tooltips ⊕ toread ⊕ tree ⊕ tutorial ⊕ ui ⊕ unittesting ⊕ url ⊕ utility ⊕ validation ⊕ validator ⊕ visualization ⊕ web ⊕ webdev ⊕ webservice ⊕ xml ⊕ yaml ⊕Copy this bookmark: