mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
Fix/json with bigints (#1710)
* fix(#1689): JSON with Bigints support * added Jsonbigint support for cli
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user