Skip to content

Commit

Permalink
change string test
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Apr 11, 2022
1 parent 0e8597c commit 47773fc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/json2iob.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ module.exports = class Json2iob {
return;
}
objectKeys.forEach(async (key) => {
// if (this.isJsonString(element[key])) {
// element[key] = JSONbig.parse(element[key]);
// }
if (this.isJsonString(element[key])) {
element[key] = JSONbig.parse(element[key]);
}

if (Array.isArray(element[key])) {
this.extractArray(element, key, path, options);
Expand Down Expand Up @@ -218,6 +218,7 @@ module.exports = class Json2iob {
isJsonString(str) {
try {
JSON.parse(str);
JSONbig.parse(str);
} catch (e) {
return false;
}
Expand Down

0 comments on commit 47773fc

Please sign in to comment.