mirror of
https://github.com/asadbek064/hyparquet-writer.git
synced 2025-12-05 23:31:54 +00:00
Fix json serialization of bigints
This commit is contained in:
parent
bfb1d74bf8
commit
3c5714996e
12
package.json
12
package.json
@ -52,15 +52,15 @@
|
||||
"test": "vitest run"
|
||||
},
|
||||
"dependencies": {
|
||||
"hyparquet": "1.20.1"
|
||||
"hyparquet": "1.20.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "7.28.5",
|
||||
"@types/node": "24.9.1",
|
||||
"@vitest/coverage-v8": "4.0.3",
|
||||
"eslint": "9.38.0",
|
||||
"eslint-plugin-jsdoc": "61.1.9",
|
||||
"@types/node": "24.10.1",
|
||||
"@vitest/coverage-v8": "4.0.8",
|
||||
"eslint": "9.39.1",
|
||||
"eslint-plugin-jsdoc": "61.2.0",
|
||||
"typescript": "5.9.3",
|
||||
"vitest": "4.0.3"
|
||||
"vitest": "4.0.8"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { toJson } from 'hyparquet'
|
||||
import { geojsonToWkb } from './wkb.js'
|
||||
|
||||
const dayMillis = 86400000 // 1 day in milliseconds
|
||||
@ -32,7 +33,7 @@ export function unconvert(element, values) {
|
||||
if (ctype === 'JSON') {
|
||||
if (!Array.isArray(values)) throw new Error('JSON must be an array')
|
||||
const encoder = new TextEncoder()
|
||||
return values.map(v => v === undefined ? undefined : encoder.encode(JSON.stringify(v)))
|
||||
return values.map(v => v === undefined ? undefined : encoder.encode(JSON.stringify(toJson(v))))
|
||||
}
|
||||
if (ctype === 'UTF8') {
|
||||
if (!Array.isArray(values)) throw new Error('strings must be an array')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user