From bc0693f0ed64307cf022eb659b3e1c658d56547a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yao=20Wei=20=28=E9=AD=8F=E9=8A=98=E5=BB=B7=29?= Date: Tue, 25 Jun 2024 23:10:33 +0800 Subject: [PATCH] CleanJSON.py: add samples on the output header and footer as heredoc --- CleanJSON.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CleanJSON.py b/CleanJSON.py index 16b9e2c3b..9b6f89777 100644 --- a/CleanJSON.py +++ b/CleanJSON.py @@ -20,6 +20,12 @@ def run(self): self.save() def make_header(self): + """ + { + "localeCode": "en", + "authors": ["author1", "author2", ], + "messages": { + """ self.output.append("{") self.output.append(' "localeCode": "{}",'.format(self.lang["localeCode"])) self.output.append( @@ -28,6 +34,11 @@ def make_header(self): self.output.append(' "messages": {') def make_footer(self): + """ + "Dummy": "Dummy" + } + } + """ self.output.append(' "Dummy": "Dummy"') self.output.append(" }") self.output.append("}")