(v: JSONValue)
| 193 | * |
| 194 | */ |
| 195 | export function encode_object(v: JSONValue) { |
| 196 | if (typeof v != 'object' || v === null || Array.isArray(v)) |
| 197 | throw new Error('rison.encode_object expects an object argument'); |
| 198 | const r = unwrap(encode_table[typeof v](v)); |
| 199 | return r.substring(1, r.length - 1); |
| 200 | } |
| 201 | |
| 202 | /** |
| 203 | * rison-encode a javascript array without surrounding parens |