From 9e4d03a79b825789f601b6b749fad53e83feee4d Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Thu, 18 Jan 2024 13:54:28 -0800 Subject: [PATCH] Fix data.GetJSON examples --- content/en/functions/data/GetJSON.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/content/en/functions/data/GetJSON.md b/content/en/functions/data/GetJSON.md index 96812e7c06..4db3c89880 100644 --- a/content/en/functions/data/GetJSON.md +++ b/content/en/functions/data/GetJSON.md @@ -89,8 +89,7 @@ my-project/ {{ $data := "" }} {{ $p := "data/books.json" }} {{ with resources.Get $p }} - {{ $opts := dict "delimiter" "," }} - {{ $data = . | transform.Unmarshal $opts }} + {{ $data = . | transform.Unmarshal }} {{ else }} {{ errorf "Unable to get resource %q" $p }} {{ end }} @@ -113,8 +112,7 @@ my-project/ {{ $data := "" }} {{ $p := "books.json" }} {{ with .Resources.Get $p }} - {{ $opts := dict "delimiter" "," }} - {{ $data = . | transform.Unmarshal $opts }} + {{ $data = . | transform.Unmarshal }} {{ else }} {{ errorf "Unable to get resource %q" $p }} {{ end }} @@ -131,8 +129,7 @@ Consider using the [`resources.GetRemote`] function with [`transform.Unmarshal`] {{ with .Err }} {{ errorf "%s" . }} {{ else }} - {{ $opts := dict "delimiter" "," }} - {{ $data = . | transform.Unmarshal $opts }} + {{ $data = . | transform.Unmarshal }} {{ end }} {{ else }} {{ errorf "Unable to get remote resource %q" $u }}