jtrancmd 2.6.3

dotnet tool install --global jtrancmd --version 2.6.3
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local jtrancmd --version 2.6.3
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=jtrancmd&version=2.6.3
                    
nuke :add-package jtrancmd --version 2.6.3
                    

jtrancmd (console app)

jtrancmd.exe is a console app for doing json to json transformations using the JTran language

Sample call

jtrancmd /c config.json /t c:\jtran\transforms\transform1.json /s c:\jtran\source\mydata.json /o c:\jtran\outout\newfile.json

Command Line Reference

/help -- Show help screen
/p -- Specify a project file
/t -- Specify a transform. Must point to a single file.
/s -- Specify a source document. Can include wildcards. Each source file will be transformed using the transform specified above.
/o -- Specify an output document or folder.
/i -- Specify an include folder.
/d -- Specify a documents folder. When this is used the document source name is "all"
/m -- Specify multiple (split) output
/a -- Specifies an argument provider. Must be in the format <dll_path::class_name>. Class must be derived from IDictionary<string, object> and constructor must have no parameters.

A project file allows you to specify all of the other items in a single file. 

<br><br>

Project File Schema

A project file can be specified to spcify all of the input and outputs. All of the items are optional (the transform, source and destination paths are mandatory and must be specified here or on the command line). Note if both a project file and a command line parameter is specified the command line parameter takes precedence.

{
  "Name":              "Project1",            
  "TransformPath":     "C:\\Documents\\JTran\\Transforms\\Race.jtran",    
  "SourcePath":        "C:\\Documents\\JTran\\Sources\\Races.json",   // Can also specify wildcards here to transform multiple files    
  "DestinationPath":   "C:\\Documents\\JTran\\Tests\\races.json",
  "IncludePaths":    
  {
     "":                "C:\\Documents\\JTran\\Includes" 
  },
  "DocumentPaths":    
  {
     "race":           "C:\\Documents\\JTran\\Documents\\Races" 
     "drivers":        "C:\\Documents\\JTran\\Documents\\Drivers" 
  },

  // Specify any extension libraries
  "ExtensionPaths":    
  [
     "C:\\Documents\\JTraExtensions\\Extensions.dll" 
  ],

  // These are passed as arguments to the transform
  "Arguments": 
  {
     "country":       "US"
  }
}

In the above sample config you would access the files like this:

{
    "#include":             "racetemplate.json",

    "#variable(races)":     "#(document(race,    'july2020.json'))",
    "#variable(drivers)":   "#(document(drivers, '2020_drivers.json'))",

    ...
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
2.6.3 275 3/6/2025
2.6.2 144 3/2/2025
2.6.1 157 2/22/2025
2.6.0 133 2/22/2025
2.5.0 153 2/16/2025
2.4.1 158 2/9/2025
2.4.0 155 1/19/2025
2.3.1 154 10/27/2024
2.3.0 139 10/25/2024
2.2.4 176 9/15/2024
2.2.3 161 9/15/2024
2.2.2 157 9/15/2024
2.2.1 164 9/14/2024
2.2.0 193 6/15/2024
2.0.0 193 4/28/2024