clickhouse-js icon indicating copy to clipboard operation
clickhouse-js copied to clipboard

Allow custom JSON parsers in the client configuration

Open slvrtrn opened this issue 11 months ago • 0 comments

  • Benchmark some select operations with libraries such as SIMD JSON
  • If there are improvements in certain cases and custom functions are easy to squeeze into the implementation, allow custom parsers to be specified to the client.

For example:

interface ClickHouseClientConfigOptions {
  // ...
  json?: {
    // default is JSON.parse
    parse?: <T = any>(str: string) => T
    // default is JSON.stringify
    stringify?: <T = any>(obj: T) => string 
  }
})

slvrtrn avatar Mar 15 '24 20:03 slvrtrn