Skip to content

Commit

Permalink
webhooksite#76 Fix bigint issues with json formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fredsted committed Sep 8, 2019
1 parent 05bfad7 commit ea7e08e
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Homestead.json
.env
.idea/workspace.xml
laravel-echo-server.json
laravel-echo-server.lock
5 changes: 5 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"clipboard": "^2.0.4",
"highlight.js": "^9.15.6",
"jquery": "^3.1.1",
"json-bigint": "^0.3.0",
"laravel-echo": "^1.3.5",
"laravel-elixir": "^4.0.0",
"moment": "^2.24.0",
Expand Down
2 changes: 1 addition & 1 deletion public/js/bundle.js

Large diffs are not rendered by default.

59 changes: 30 additions & 29 deletions public/js/libs.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ angular
}

try {
var json = JSON.parse(content);
var json = JSONbig.parse(content);
if (typeof json != 'string') {
json = JSON.stringify(json, undefined, 2);
json = JSONbig.stringify(json, undefined, 2);
}
} catch (e) {
return content;
Expand Down
1 change: 1 addition & 0 deletions resources/assets/js/libs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ require('bootstrap-notify');
require('angular');
require('angular-ui-router');
window.Clipboard = require('clipboard');
window.JSONbig = require('json-bigint');

window.hljs = require('highlight.js/lib/highlight');
var javascript = require('highlight.js/lib/languages/javascript');
Expand Down

0 comments on commit ea7e08e

Please sign in to comment.