Error for getJSON when used with Resources.getResources

You’re mixing two APIs here.

I would call getJSON a legacy API by know. We may eventually hide it from the docs.

I recommend you use resources.GetRemote for “everything”.

But to get a map from JSON, you need one extra step, e.g.

{{ with resources.GetRemote $siteUrl  }}
{{ $siteData := . | transform.Unmarshal }}
{{ end }}
6 Likes