In looking at the example code you show in the readme, it shows this:
buffer = buffer.slice(0, offset);
This creates a buffer containing some binary characters near the beginning and then simply the JSON string following, which doesn't seem correct. If I change the line to this:
buffer = buffer.slice(offset);
It then outputs a pure binary buffer, which still fails in the parser I'm working on. The second approach makes somewhat more sense to me, but I'm not convinced either is working correctly. I'm sending the result back in nodejs like this:
In looking at the example code you show in the readme, it shows this:
This creates a buffer containing some binary characters near the beginning and then simply the JSON string following, which doesn't seem correct. If I change the line to this:
It then outputs a pure binary buffer, which still fails in the parser I'm working on. The second approach makes somewhat more sense to me, but I'm not convinced either is working correctly. I'm sending the result back in nodejs like this:
Does this seem like a valid approach? Or, am I totally misunderstanding the example?