Skip to content

Conversation

@facontidavide
Copy link
Collaborator

Summary

  • Fix std::vectorstd::string ports being initialized with literal json:[] string instead of empty vector
  • Handle json: prefix correctly in convertFromString specializations for vector types

Test plan

  • New test: PortTest.DefaultEmptyVector_Issue982
  • All existing tests pass (298/298)

Closes #982

@coderabbitai
Copy link

coderabbitai bot commented Feb 1, 2026

Warning

Rate limit exceeded

@facontidavide has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/issue-982

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…ions

When a port of type std::vector<T> has a default empty value {} and no
input is specified in XML, toStr() converts the empty vector to "json:[]".
The explicit convertFromString specializations for vector types did not
handle the "json:" prefix (unlike the generic template), so this string
was split by ';' producing a vector with one literal "json:[]" element.

Fix: add "json:" prefix detection at the top of all four vector
convertFromString specializations (int, double, bool, string). When
detected, parse directly with nlohmann::json instead of splitting by ';'.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@facontidavide facontidavide merged commit 223b3ed into master Feb 1, 2026
12 checks passed
@facontidavide facontidavide deleted the fix/issue-982 branch February 1, 2026 17:50
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.

Vectors being initialized with json:[] string

1 participant