quickjs-emscripten icon indicating copy to clipboard operation
quickjs-emscripten copied to clipboard

`encodeBinaryJSON`, `decodeBinaryJSON` error handling and flags

Open jscheid opened this issue 8 months ago • 1 comments

Hi, thanks for this lib. I'm working on small improvements to encodeBinaryJSON and decodeBinaryJSON:

  • Return a QuickJSContextResult<QuickJSHandle> instead of a QuickJSHandle, to surface any errors.
  • Accept flags and pass them through, instead of hardwiring JS_WRITE_OBJ_REFERENCE for encode and no flags for decode.

I've noticed that there are a few PRs open and not much activity in recent months, so before I open a new PR I just wanted to check to see if you're interested in these improvements? If so we'd also have to discuss backward compatibility.

jscheid avatar Jun 24 '25 17:06 jscheid

If you open a PR, I'll merge it if the tests pass :)

justjake avatar Jul 21 '25 17:07 justjake