Skip to content

Conversation

@sontek
Copy link
Collaborator

@sontek sontek commented Dec 9, 2025

When we have a JSON string (like container definitions) if it is unresolved we are inserting a reference string in there to what was unresolved but its not valid JSON so if anyone uses fromjson() on it it will fail.

This detects JSON strings and formats it properly while maintaining the reference.

When we have a JSON string (like container definitions) if it is
unresolved we are inserting a reference string in there to what was
unresolved but its not valid JSON so if anyone uses `fromjson()` on it
it will fail.

This detects JSON strings and formats it properly while maintaining
the reference.
Copy link
Member

@ajkerrigan ajkerrigan left a comment

Choose a reason for hiding this comment

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

Thanks @sontek , good catch!

At first glance I wondered if given the use case it would be clearer as a c7n-left-specific tweak to the custom jmespath function, but it seems like a better call to catch this at parse time and make the downstream piece simpler 👍 .

@sontek sontek merged commit 7010fa6 into main Dec 18, 2025
15 checks passed
@sontek sontek deleted the fix_json_strings branch December 18, 2025 17:40
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.

3 participants