Skip to content
quinkennedy edited this page Jan 16, 2014 · 2 revisions

How specific do we need to be?

  • least specific
  • image
  • jpg_image, image_url
  • binary_jpg, jpg_url
  • most specific

###number 32-bit (Arduino long, int for many other languages)

  • Quin votes 32-bit

###float 32-bit floating point number, in hexidecimal notation to avoid rounding errors.

It should be noted and discussed that this goes against the JSON standard which states

A number can be represented as integer, real, or floating point. JSON does not support octal or hex because it is minimal. (http://www.json.org/fatfree.html)

###Binary This is probably not a useful base-type, but is a category of types that I would like to support, and requires either base-64 encoding behind the curtains, or opening a separate websocket to handle binary data vs. textual data, or just always using a binary socket and handling the onus of converting text/json content ourselves.

###point Is this a 2d point or a 3d point? These could also be called vectors. Do we want vector_2d and vector_3d? suggested JSON format:

{x:FLOAT, y:FLOAT, z:FLOAT}

again prompts the question of how to represent floats

###rectangle is the format similar to a pair of points? Is the second point the width/height/depth or the "far" point?

{x1:, y1:, z1:, x2:, y2:, z2:}

vs

{x:, y:, z:, w:, h:, d:}

Clone this wiki locally