Skip to content

json2: make decoder2 fns public#25498

Merged
spytheman merged 2 commits into
vlang:masterfrom
gechandesu:decoder2_make_pub
Oct 14, 2025
Merged

json2: make decoder2 fns public#25498
spytheman merged 2 commits into
vlang:masterfrom
gechandesu:decoder2_make_pub

Conversation

@gechandesu

@gechandesu gechandesu commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

2d33a7f breaks programs that already uses x.json2.decoder2 module. This PR fixes it.

main.v:173:15: warning: function `x.json2.decoder2.decode` has been deprecated since 2025-10-12, it will be an error after 2026-04-10; `decode` has been moved to `x.json2`, use `decode` from `x.json2` instead
  171 |     j := json.encode[item.Item](i, prettify: true, indent_string: '  ')
  172 |     println(j)
  173 |     d := decoder.decode[item.Item](j)!
      |                  ~~~~~~~~~~~~~~~~~~~~
  174 |     assert i == d
  175 | }
main.v:173:15: error: function `x.json2.decoder2.decode` is private
  171 |     j := json.encode[item.Item](i, prettify: true, indent_string: '  ')
  172 |     println(j)
  173 |     d := decoder.decode[item.Item](j)!
      |                  ~~~~~~~~~~~~~~~~~~~~
  174 |     assert i == d
  175 | }

@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-26180

@spytheman

spytheman commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

Thank you 🙇🏻 .

@spytheman spytheman merged commit 69a0ec3 into vlang:master Oct 14, 2025
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants