Back to photostream

Using UTF-8

The easiest way to get plain data to a browser is to encode it as JSON, and that's what we did. We encode the grid data into a JSON data structure by applying a couple of tricks. Each row is a string that contains one character for each column. Additionally, using JSON allows us to easily associate complex data structures with every pixel (or group of pixels when using a 64x64 grid).

 

 

When we do that with every pixel in the grid, we end up with something that looks like this:

 

 

 

136 views
0 faves
0 comments
Uploaded on September 20, 2011