Add ToLower, Trim, ToDecimal transforms and AddJsonTransform DI convenience method#20
Draft
Copilot wants to merge 2 commits into
Draft
Add ToLower, Trim, ToDecimal transforms and AddJsonTransform DI convenience method#20Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/mathieumack/JSLTSharp/sessions/50cd9ad1-7085-46df-b0f9-43faf863a6b7 Co-authored-by: mathieumack <12582537+mathieumack@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Propose new features or improvements for developers
Add ToLower, Trim, ToDecimal transforms and AddJsonTransform DI convenience method
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JSLTSharp lacked several common string/numeric transforms and required two separate DI registration calls to wire up the engine.
New built-in transformation operations
ToLower— lower-cases a string field (complement toToUpper)Trim— strips leading/trailing whitespace from a string fieldToDecimal— converts string, integer, float, or boolean to decimal; returnsnullon unconvertible input (complement toToInteger)All three are registered automatically via the existing
RegisterJsonCustomTransformFunctions().Simplified DI registration
New
AddJsonTransform()extension method collapses the previous two-step setup into one:Usage examples
{ "normalized": "$.rawField->Trim()->ToLower()" } { "price": "$.rawPrice->ToDecimal()" }