Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json2: add support for nested structs (fix #19549) #19579

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

islonely
Copy link
Contributor

@islonely islonely commented Oct 16, 2023

🤖 Generated by Copilot at 830bde7

edit: fixes #19549
Enhance and refactor struct decoding in json2 module. Add more tests for nested structs in vlib/x/json2/decode_struct_test.v and extract a reusable decode_struct function in vlib/x/json2/json2.v.

🤖 Generated by Copilot at 830bde7

  • Refactor decode function to use decode_struct helper for structs (link)
  • Implement decode_struct function to handle nested structs recursively (link)
  • Add StructTypeSub type and test cases for decoding nested structs in vlib/x/json2/decode_struct_test.v (link, link)

@spytheman spytheman merged commit b8d4764 into vlang:master Oct 16, 2023
40 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.

json2:Getting Incorrect Results when Decoding
2 participants