File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 33// 本文件用于wechat API,基础文件,主要用于Token的处理和mixin机制
44const httpx = require ( 'httpx' ) ;
55const liburl = require ( 'url' ) ;
6+ const JSONbig = require ( 'json-bigint' ) ;
67const {
78 replaceJSONCtlChars
89} = require ( './util' ) ;
@@ -129,7 +130,7 @@ class API {
129130 var data ;
130131 var origin = buffer . toString ( ) ;
131132 try {
132- data = JSON . parse ( replaceJSONCtlChars ( origin ) ) ;
133+ data = JSONbig . parse ( replaceJSONCtlChars ( origin ) ) ;
133134 } catch ( ex ) {
134135 let err = new Error ( 'JSON.parse error. buffer is ' + origin ) ;
135136 err . name = 'WeChatAPIError' ;
Original file line number Diff line number Diff line change 1717 ],
1818 "dependencies" : {
1919 "formstream" : " >=0.0.8" ,
20- "httpx" : " ^2.1.1"
20+ "httpx" : " ^2.1.1" ,
21+ "json-bigint" : " ^0.2.3"
2122 },
2223 "devDependencies" : {
2324 "coveralls" : " *" ,
You can’t perform that action at this time.
0 commit comments