Skip to content

Function #transform: handles multiple transforms#267

Closed
Courela wants to merge 13 commits intoWorkMaze:masterfrom
Truphone:feature/multiple_transforms
Closed

Function #transform: handles multiple transforms#267
Courela wants to merge 13 commits intoWorkMaze:masterfrom
Truphone:feature/multiple_transforms

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

Courela added 3 commits April 29, 2023 11:22
# 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