Skip to content

Releases: JTranOrg/JTran

4.1.0

28 Apr 21:38
27f8f04
Compare
Choose a tag to compare
  • New features in JTran

    • Functions
      • ensureendswith - (New) Returns a string that endswith the given substring only appending it if it does not currently end with that value.
    • Elements
      • #outputvariable - (New) Output variables allows you to generate a value that the transform caller can pick up
    • Other
      • Allow a POCO as the input source
      • Add ability to output to multiple locations e.g. files
      • Output variables event handler. Signals an output variable creation/update.
      • Changed the Arguments passed in from the TransformerContext to load in realtime instead of pre-loaded. This allows a custom dictionary to be implemented from a store, e.g. KeyVault
  • New features in JTran.Console

    • Output to multiple files (splitting)

4.0.0

01 Apr 23:26
743c3bd
Compare
Choose a tag to compare
  • Remove all external dependencies

    • Merged expression parser project back into main JTran project.
    • Created a new Json parser to replace external library.
      • The same parser parses the json data source and the jtran transform file.
    • JTran is now a single dll with no dependendencies on external NuGet packages.
  • Increased performance

    • Mostly with the use of ICharacterSpan which replaces strings and is cached.
    • When the input data source is a POCO list then we can do shortcuts to retrieve data values during the transformation.
    • Replace use of ExpandoObject with a custom JsonObject.
  • Lower memory footprint

    • ICharacterSpan reduces the amount of memory needed for the in-memory json model
    • Use of helper enumerable classes to do real time handling of arrays, e.g. where clauses, joins, etc. This means not having to create a whole new array in memory to do a where filter, etc.
    • When the input json file is an array (starts with "[") the parsing is deferred and only parsed one item at a time (and then disposed). This allows very large json files to be transformed without needing to parse the entire json model into memory.
  • Refactoring

    • Several areas were refactored to support all the other bullet items and just to simplify things.
  • New features

    • Functions
      • union - (New) Appends two arrays together
      • join - (New) Joins a list of strings together
      • guid - (New) Generates a guid
    • Elements
      • #innerjoin - (New) Create a single array from two arrays by matching objects from each array. Only objects that matched are included.
      • #outerjoin - (New) Create a single array from two arrays by matching objects from each array. All objects from the "left" array are included regardless if there is a matching object on the "right".
      • #include - (New) Filters an object to only output the given list of properties.
      • #exclude - (New) Filters an object to excluded given list of properties.
      • #foreachgroup - Now supports grouping on multiple fields.
      • #calltemplate - Now supports a simplified syntax, e.g. instead of #calltemplate(mytemplate) you can use #mytemplate.
      • #iif - Now supported as an element in addition to a function. Operates the same as a tertiary operator.
      • #iterate - Outputs an array by iterating a given number of times. Useful for creating sample data (in conjunction with the Random library).
    • Other
      • JTran can load a json array (starts with "[").
      • JTran can now output a json array.
      • Add support for // comments.
  • Bug Fixes

    • Operator Precedence - Some operators were interpreted in serial order that should have had equal precedence, e.g. +/-. Lots of unit tests added to ensure correctness.
    • Line numbers in exceptions - Line numbers are now correctly reported in exceptions while parsing both the json data source and the jtran transform file.
  • Testing

    • Created a new unit test project: JTran.Transform.UnitTests. All unit tests that actually test transforms will be moved there (still a work in progress).
    • Created the ROTA test project. ROTA is a fictional logistics company. The idea is to provide real-world tests and samples on how to use JTran (also a work in progress).
    • Created a test project for loading and transforming data from a Mongo DB.
    • Added a couple of projects for testing performance.
  • New Projects

    • Added new helper library for creating random output. This is used as a JTran extension library and is useful for generating sample data. Is a separate NuGet package: JTran.Random.