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

Function #transform: handles multiple transforms #267

Closed
wants to merge 13 commits into from

Conversation

Courela
Copy link
Contributor

@Courela Courela commented Apr 7, 2023

#applyover function was cumbersome for more complex transformations, due to the need to escape all special characters.
#transform function introduced to mitigate that.

#265

# Conflicts:
#	README.md
#	UnitTestForExternalAssemblyBug/UnitTestForExternalAssemblyBug.csproj
#	UnitTests/JUST.net.UnitTests.csproj
"{ \"#transform($)\": [ " +
"{ \"condition\": { \"#loop($.values)\": { \"test\": \"#ifcondition(#stringcontains(#valueof($.d[0]),#currentvalue()),True,yes,no)\" } } }, " +
"{ \"intermediate_transform\": \"#valueof($.condition)\" }," +
"\"#exists($.intermediate_transform[?(@.test=='yes')])\" ] } }";

Choose a reason for hiding this comment

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

Please consider using raw string literals (e.g. "triple quotes") to make these JSONs more readable.
See: https://devblogs.microsoft.com/dotnet/csharp-11-preview-updates/

(Of course, you'll need to bump the language version to 11.)

@Courela Courela closed this Dec 2, 2023
@Courela
Copy link
Contributor Author

Courela commented Dec 2, 2023

Done in #289

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