rest/datatypes: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
! [http://www.sysprog.net/ctype.html C] | ! [http://www.sysprog.net/ctype.html C] | ||
| char* || float, double || int, long, short || byte || void* || N/A | | char* || float, double || int, long, short || byte || void* || N/A | ||
|- | |||
! [http://www.crockford.com/JSON JSON] (JavaScript) | |||
| string || number || number || true, false || object || N/A | |||
|- | |- | ||
|} | |} |
Revision as of 05:05, 7 January 2006
Datatypes in HTML
One of the challenges of using HTML as a data transport is that everything, by default, is a string. This page explores ways to use microformats -- specifically, class names -- to encode data type information, e.g., for use with xoxo and rest/ahah.
Examples
Language/format | string | float | integer | boolean | data | date/time |
---|---|---|---|---|---|---|
XML Schema | string | float, double | decimal, integer, etc. | boolean | hexBinary, base64Binary | duration, dateTime, date, time |
Mac OS X plists | string | real | integer | true, false | data | date |
C | char* | float, double | int, long, short | byte | void* | N/A |
JSON (JavaScript) | string | number | number | true, false | object | N/A |
Proposals
- TBD