def render(self): if self.content: self.data = yaml.safe_load(self.content) if self.override: self.data = dict_merge(self.data, self.override) self.content = yaml.safe_dump(self.data)
def render(self): if self.content: self.data = json.loads(self.content) if self.override: self.data = dict_merge(self.data, self.override) self.content_compact = json.dumps( self.data, sort_keys=True, separators=(",", ":")) self.content_readable = json.dumps(self.data, sort_keys=True, indent=4) if self.human_readable: self.content = self.content_readable else: self.content = self.content_compact