| coerce to > | real (double) | int (long) | byte (uchar) | bool (uchar) | string (sprintf) |
|---|---|---|---|---|---|
| real (double) | IEEE | 0xFF mask of int | 0x01 mask of int | %g | |
| int (long) | IEEE | 0xFF mask | 0x01 mask | %ld | |
| byte (uchar) | from int | sign smear | 0x01 mask | %c | |
| bool (uchar) | 0.0 or 1.0 | 0 or 1 | 0x00 or 0x01 | "0" or "1" | |
| string (sscanf) | %g | %ld | %c | not "" or "0" |
| coerce to > | [] | {} |
|---|---|---|
| [] | {} | |
| [1,2] | {"0":1,"1":2} | |
| {} | [] | |
| {"foo":1,"bar":2} | [1,2] |