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

Fix/json serialization detected object #573

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

paulbourelly999
Copy link
Contributor

@paulbourelly999 paulbourelly999 commented Dec 19, 2023

PR Details

Description

Temporary fix for JSON serialization for TMX messages. See related issue for more detailed description of error behavior. Using simple regex replacement to correct bool, double and integer values

Related Issue

#561 (#561)

Motivation and Context

Fix for VRU UC 1 testing of SDSM functionality

How Has This Been Tested?

Integration tested in CDASim deployment

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
    V2XHUB Contributing Guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@paulbourelly999 paulbourelly999 marked this pull request as ready for review December 19, 2023 22:17
produce_kafka_msg( msg.to_string(), _transmitSimSensorDetectedObjTopic);
boost::regex exp("\"(null|true|false|-?[0-9]+(\\.[0-9]+)?)\"");
std::stringstream ss;
std::string rv = boost::regex_replace(msg.to_string(), exp, "$1");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this $1 represent the original value without quote around them?

@dan-du-car dan-du-car merged commit 70e798b into develop Dec 20, 2023
9 checks passed
@dan-du-car dan-du-car deleted the fix/json_serialization_detected_object branch December 20, 2023 21:08
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