Skip to content

Commit d06863b

Browse files
authored
Merge pull request #451 from AllenInstitute/bugfix/save-as-json-format
(Tiny) Fix JSON formatting for metadata downloads
2 parents 1c0883f + 07122d5 commit d06863b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/web/src/services/DatabaseServiceWeb.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export default class DatabaseServiceWeb extends DatabaseService {
3838
}
3939

4040
const resultName = `${destination}.${format}`;
41-
const finalSQL = `COPY (${sql}) TO '${resultName}' (FORMAT '${format}');`;
41+
const formatOptions = format === "json" ? ", ARRAY true" : "";
42+
const finalSQL = `COPY (${sql}) TO '${resultName}' (FORMAT '${format}'${formatOptions});`;
4243
const connection = await this.database.connect();
4344
try {
4445
await connection.send(finalSQL);

0 commit comments

Comments
 (0)