Skip to content

json: fix raw decode to option string of complex data#18902

Merged
medvednikov merged 2 commits intovlang:masterfrom
felipensp:fix_json_raw_opt_2
Jul 19, 2023
Merged

json: fix raw decode to option string of complex data#18902
medvednikov merged 2 commits intovlang:masterfrom
felipensp:fix_json_raw_opt_2

Conversation

@felipensp
Copy link
Copy Markdown
Member

@felipensp felipensp commented Jul 18, 2023

Fix #18895

🤖 Generated by Copilot at 1afc9e8

This pull request adds a test file for the [raw] annotation in JSON decoding and fixes a bug in the code generation for optional [raw] fields. The bug caused some fields to be decoded as none instead of their actual JSON values.

🤖 Generated by Copilot at 1afc9e8

  • Fix a bug in decoding optional [raw] fields in JSON (link)
  • Add a new test file vlib/json/json_option_raw_test.v (link)

@felipensp felipensp marked this pull request as ready for review July 19, 2023 15:09
@medvednikov medvednikov merged commit 511274a into vlang:master Jul 19, 2023
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.

Optional raw json field is 'none' when not a string

3 participants