| 335 | |
| 336 | |
| 337 | static int json_encode(lua_State* L) |
| 338 | { |
| 339 | try{ |
| 340 | Encoder encode(L, 2); |
| 341 | StringBuffer s; |
| 342 | encode.encode(L, &s, 1); |
| 343 | lua_pushlstring(L, s.GetString(), s.GetSize()); |
| 344 | return 1; |
| 345 | } |
| 346 | catch (...) { |
| 347 | luaL_error(L, "error while encoding"); |
| 348 | } |
| 349 | return 0; |
| 350 | } |
| 351 | |
| 352 | |
| 353 | static int json_dump(lua_State* L) |
nothing calls this directly
no test coverage detected