Write json file using vault k8s injector and Consul Template

Currently I’m using the vault k8s injector and k8s deployment annotations to inject a file with secrets for an app I’m working on. Wondering if it’s possible to inject in json format? Seems like I can use a range, but this is super dirty.

vault.hashicorp.com/agent-inject-template-{{ .Values.vaultInjectorAgent.agentAnnotationConfig.secretVolumeName }}.json: |
           {{`{{ with secret `}}"{{ .Values.vaultInjectorAgent.agentAnnotationConfig.vaultKVPath }}" {{`-}}
             {{ range $k, $v := .Data.data }}
               {{ $k }}: "{{ $v }}",
             {{ end }}
           {{- end }}`}}