Deprecation warning for unused `data.GetJSON`

When I run hugo or hugo server with --verbose, it tells me

INFO deprecated: data.GetJSON was deprecated in Hugo v0.123.0 and will be removed in a future release. use resources.Get or resources.GetRemote with transform.Unmarshal.

However, I don’t use data.GetJSON anywhere in my code (checked with grep -ir as well as with VSCode’s global search). Only resources.Get with transform.Unmarshal. Why the warning?

Any modules involved. Rheir code won’t be in your project folder

No, I don’t use modules. And the warning disappears if I turn off verbose.

Mmh.i don’t get it.

Deprecation warnings are only printed in verbose mode. So it’s ok if the warning is not there if you don’t set it.

But I never get that warning when I don’t use the method

???

Btw --verbose is deprecated since 114. Use --logLevel info instead

Ha. I had getJSON in my code, not data.getJSON. So, all is good.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.