Backslashes (\)
Are Removed During JSON Conversion of PlanDefinition StructureMap
#334
Labels
(\)
Are Removed During JSON Conversion of PlanDefinition StructureMap
#334
Problem
When converting a PlanDefinition StructureMap to JSON, backslashes (
\
) inside string literals are being stripped out. This affects expressions such as:$this + '7 \'days\''.toQuantity()
which should be preserved in the JSON output as:
However, the backslashes are being removed, causing incorrect JSON formatting and potential failures in evaluation.
Expected Behavior
The conversion process should preserve escape characters () within string literals.
The JSON output should correctly represent expressions without altering or stripping necessary escape sequences.
Solution
Update the JSON conversion logic to ensure backslashes are properly escaped.
Add test cases to verify that expressions containing single quotes within strings remain correctly formatted.
Impact
Without this fix, expressions may break during execution, leading to incorrect evaluations.
Ensures FHIR-compliant transformation and prevents potential runtime errors in downstream processing.
The text was updated successfully, but these errors were encountered: