gojq icon indicating copy to clipboard operation
gojq copied to clipboard

Support concurrency / improved performance for multiple queries on same JSON payload

Open samsullivan opened this issue 1 year ago • 2 comments

RE: https://github.com/itchyny/gojq/issues/236

I don't love the naming decisions of this implementation, but the main idea is that I needed a way to run normalize numbers once for a JSON payload. Should also be backwards compatible with existing functions.

For an example implementation: https://github.com/samsullivan/jqless/pull/3

samsullivan avatar Jan 14 '24 05:01 samsullivan

Also, the type safety isn't the best here, since you can convert any interface to gojq.PreparedData without actually normalizing numbers...

samsullivan avatar Jan 14 '24 05:01 samsullivan

Fantastic work @samsullivan ! Hopefully this gets tested and approved :)

smithxxl avatar Feb 27 '24 15:02 smithxxl