Fix/json with bigints (#1710)

* fix(#1689): JSON with Bigints support
* added Jsonbigint support for cli
This commit is contained in:
Sanjai Kumar
2024-03-04 15:32:35 +05:30
committed by GitHub
parent cc02794ce9
commit e2d1f52993
7 changed files with 14222 additions and 3819 deletions

View File

@@ -1,5 +1,6 @@
const { get, each, filter } = require('lodash');
const fs = require('fs');
var JSONbig = require('json-bigint');
const decomment = require('decomment');
const prepareRequest = (request, collectionRoot) => {
@@ -87,7 +88,7 @@ const prepareRequest = (request, collectionRoot) => {
axiosRequest.headers['content-type'] = 'application/json';
}
try {
axiosRequest.data = JSON.parse(decomment(request.body.json));
axiosRequest.data = JSONbig.parse(decomment(request.body.json));
} catch (ex) {
axiosRequest.data = request.body.json;
}