mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 07:23:58 +00:00
Fix parsing of JSON data
This commit is contained in:
@@ -452,9 +452,10 @@ const driver = {
|
|||||||
res.value = await dbhan.client.get(key);
|
res.value = await dbhan.client.get(key);
|
||||||
break;
|
break;
|
||||||
case 'ReJSON-RL':
|
case 'ReJSON-RL':
|
||||||
res.type = 'json';
|
res.type = 'JSON';
|
||||||
try {
|
try {
|
||||||
res.value = JSON.stringify(await dbhan.client.call('JSON.GET', key), null, 2);
|
const jsonData = await dbhan.client.call('JSON.GET', key);
|
||||||
|
res.value = JSON.stringify(JSON.parse(jsonData), null, 2);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.value = '';
|
res.value = '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user