From 0bdefe6256ec16c13028ebe0f611d4db7f7b1270 Mon Sep 17 00:00:00 2001 From: Marten Veldthuis <marten@veldthuis.com> Date: Thu, 11 Nov 2021 09:50:48 +0100 Subject: [PATCH] Write out pretty-printed JSON --- lib/quby/compiler/instance.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/quby/compiler/instance.rb b/lib/quby/compiler/instance.rb index 104be62..2939c60 100644 --- a/lib/quby/compiler/instance.rb +++ b/lib/quby/compiler/instance.rb @@ -36,7 +36,7 @@ module Quby roqua: Output.new( key: :roqua, filename: "roqua.json", - content: Outputs::RoquaSerializer.new(questionnaire).to_json, + content: JSON.pretty_generate(Outputs::RoquaSerializer.new(questionnaire).as_json) ), seeds: Output.new( key: :seeds, @@ -46,12 +46,12 @@ module Quby quby_frontend_v1: Output.new( key: :quby_frontend_v1, filename: "quby-frontend-v1.json", - content: Outputs::QubyFrontendV1Serializer.new(questionnaire).to_json, + content: JSON.pretty_generate(Outputs::QubyFrontendV1Serializer.new(questionnaire).as_json), ), quby_frontend_v2: Output.new( key: :quby_frontend_v2, filename: "quby-frontend-v2.json", - content: Outputs::QubyFrontendV2Serializer.new(questionnaire).to_json, + content: JSON.pretty_generate(Outputs::QubyFrontendV2Serializer.new(questionnaire).as_json), ), }, } -- GitLab