ClickHouse / clickhouse-js

Official JS client for ClickHouse DB
https://clickhouse.com
Apache License 2.0
213 stars 26 forks source link

Allow custom JSON parsers in the client configuration #246

Open slvrtrn opened 6 months ago

slvrtrn commented 6 months ago

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 
  }
})