using uCalcSoftware; var uc = new uCalc(); using (var t = new uCalc.Transformer()) { // 1. Define rules to remove whitespace and newlines. // The engine's default QuoteSensitive=true ensures whitespace inside strings is protected. t.FromTo("{@Whitespace}", ""); t.FromTo("{@Newline}", ""); // 2. Define the formatted input string. var formattedJson = """ { "id": 123, "name": "Example, with spaces", "tags": [ "A", "B" ] } """; // 3. Run the transformation and print the result. Console.WriteLine(t.Transform(formattedJson)); }