Skip to content

Commit

Permalink
Prettify the json in the object editor
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasolson committed Feb 5, 2015
1 parent d877908 commit ee4b51e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kibana/plugins/settings/sections/objects/_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ define(function (require) {

if (_.isString(field.value)) {
try {
field.value = angular.toJson(JSON.parse(field.value), null, ' ');
field.value = angular.toJson(JSON.parse(field.value), true);
field.type = 'json';
} catch (err) {
field.value = field.value;
Expand All @@ -54,7 +54,7 @@ define(function (require) {
field.type = 'number';
} else if (_.isArray(field.value)) {
field.type = 'array';
field.value = angular.toJson(field.value, null, ' ');
field.value = angular.toJson(field.value, true);
} else if (_.isPlainObject(field.value)) {
// do something recursive
return _.reduce(field.value, _.partialRight(createField, parents), memo);
Expand Down

0 comments on commit ee4b51e

Please sign in to comment.