Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
Michael Dykman edited this page Oct 5, 2016 · 12 revisions

Introduction to JTL

jtl is designed to be used as a command-line tool, a scripting language and as an HTTP server whether stand-alone server or as a standard WAR.

Inspiration for JTL

JSON has ascended dramatically over the last few years as a data interchange format taking over the space and function once occupied by firmly by XML.

While XML can be seen as heavyweight in contrast to JSON, it was a significant improvement over the patchwork of proprietary inventions which had previously been used, so much so that standards bodies such as the W3C adopted it quickly and spearheaded many standards specifications. The DOM API (Document Object Model), XPath, XQuery, XSL and many others were developed and ratified by industry leaders to accommodate a unified approach to tooling, taking advantage of the well-defined, generic nature of XML.

As JSON as risen to overtake this space, we saw the rapid addition of JSON handling capabilities to nearly every major language. In the absence of anything like a DOM API, each language has it's own abstraction for representing JSON data. There is no XPath, no XSL nor anything like it. Every language has it's own idiosyncratic method for traversal, analogous to DOM traversal, but without standards.

XSL gave us a powerful mechanism for transforming any format of XML into any other format of XML. The XSL language, itself a specialized type of XML, is a declarative language which provides structure to the transform. It integrates the XPath language which is used for selecting input data, enhancing it with a few XSL-specific functions.

JSON began it's life as a subset of JavaScript, being the minimum syntax required to describe literal data contracts of arbitrary complexity. It does not support esoteric features such as XML's namespaces which is what permits XSL to be a valid form of XML allowing for data literals and still support higher-level functions. If JSON is to enjoy a similar facility, the language will have to be as a super-set of JSON.

As JTL is a super-set of JSON, that means all valid JSON expressions must be recognized as literal data. Any higher level functions must be implemented with extensions which are syntactically not JSON. These extensions are termed here JPath, which is a nod to XPath upon which it is conceptually based. JTL may be defined as JSON with JPath extensions. JPath and literal JSON data may be interchanged freely.

Some simple JPath expression may be found here: JTL command line

Clone this wiki locally