{"id":22907437,"url":"https://github.com/oswaldobapvicjr/jep-data-extension","last_synced_at":"2025-05-08T22:18:00.049Z","repository":{"id":49288554,"uuid":"159519770","full_name":"oswaldobapvicjr/jep-data-extension","owner":"oswaldobapvicjr","description":"An extension of the Java Expression Parser library with useful functions for data handling","archived":false,"fork":false,"pushed_at":"2025-05-06T14:44:24.000Z","size":581,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-08T22:17:36.342Z","etag":null,"topics":["data-manipulation","java","jep","jsonpath","regular-expression","xpath"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oswaldobapvicjr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-11-28T15:03:32.000Z","updated_at":"2025-05-06T14:44:25.000Z","dependencies_parsed_at":"2024-03-28T20:31:31.100Z","dependency_job_id":"9d35d23b-5ab1-4469-914c-0c1a90f4c4db","html_url":"https://github.com/oswaldobapvicjr/jep-data-extension","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oswaldobapvicjr%2Fjep-data-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oswaldobapvicjr%2Fjep-data-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oswaldobapvicjr%2Fjep-data-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oswaldobapvicjr%2Fjep-data-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oswaldobapvicjr","download_url":"https://codeload.github.com/oswaldobapvicjr/jep-data-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154983,"owners_count":21862624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-manipulation","java","jep","jsonpath","regular-expression","xpath"],"created_at":"2024-12-14T03:15:12.349Z","updated_at":"2025-05-08T22:17:59.926Z","avatar_url":"https://github.com/oswaldobapvicjr.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jep-data-extension\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/oswaldobapvicjr/jep-data-extension/maven.yml)](https://github.com/oswaldobapvicjr/jep-data-extension/actions/workflows/maven.yml)\n[![Coverage](https://img.shields.io/codecov/c/github/oswaldobapvicjr/jep-data-extension)](https://codecov.io/gh/oswaldobapvicjr/jep-data-extension)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.obvj/jep-data-extension/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.obvj/jep-data-extension)\n[![javadoc](https://javadoc.io/badge2/net.obvj/jep-data-extension/javadoc.svg)](https://javadoc.io/doc/net.obvj/jep-data-extension)\n\n**jep-data-extension** is a project that  extends JEP, the powerful mathematical expression parser and evaluator for Java, introducing data manipulation capabilities with custom functions and operators ready to use, including **RegEx**, **XPath**, **JSONPath** and **Web Services**.\n\n\u003e For details about JEP core features, access [JEP documentation](http://www.singularsys.com/jep/doc/html/index.html).\n\n---\n\n## New functions\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003ePackage\u003c/th\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd rowspan=\"18\"\u003e\u003cb\u003eString functions\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003ecamel\u003c/td\u003e\n\u003ctd\u003eConverts a string to camel case\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003econcat\u003c/td\u003e\n\u003ctd\u003eConcatenates the arguments into a string.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eendsWith\u003c/td\u003e\n\u003ctd\u003eReturns 1 (true) if a string ends with the specified suffix.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003efindMatch\u003c/td\u003e\n\u003ctd\u003eReturns the first match of the given regular expression found inside a string.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003efindMatches\u003c/td\u003e\n\u003ctd\u003eReturns a list containing all matches of the given regular expression inside a string.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eformatString\u003c/td\u003e\n\u003ctd\u003eReturns a formatted string according to given pattern and variable arguments.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003elpad/leftPad\u003c/td\u003e\n\u003ctd\u003eLeft-pads a string to a given size. \n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003elcase/lower\u003c/td\u003e\n\u003ctd\u003eConverts a text string to all lower-case letters.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ematches\u003c/td\u003e\n\u003ctd\u003eReturns a 1 if the given string contains at least one match of a given RegEx.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003enormalizeString\u003c/td\u003e\n\u003ctd\u003eNormalizes a Unicode string, replacing accents and other diacritics with ASCII chars.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eproper\u003c/td\u003e\n\u003ctd\u003eConverts a string to proper case, i.e., only the first letter in each word in upper-case.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ereplace\u003c/td\u003e\n\u003ctd\u003eReplaces all occurrences of a given string with another one.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ereplaceRegex\u003c/td\u003e\n\u003ctd\u003eReplaces all matches of a given regular expression.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003erpad/rightPad\u003c/td\u003e\n\u003ctd\u003eRight-pads a string to a given size. \n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003esplit\u003c/td\u003e\n\u003ctd\u003eSplits a string into a string array based on a separating string or regular expression.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003estartsWith\u003c/td\u003e\n\u003ctd\u003eReturns 1 if a string starts a given prefix.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003etrim\u003c/td\u003e\n\u003ctd\u003eRemoves leading and trailing spaces.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eucase/upper\u003c/td\u003e\n\u003ctd\u003eConverts a text string to all upper-case letters.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd rowspan=\"16\"\u003e\u003cb\u003eDate functions\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003enow/sysdate\u003c/td\u003e\n\u003ctd\u003eReturns the system's current date \u0026 time.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003estr2date\u003c/td\u003e\n\u003ctd\u003eConverts a string into date by trying different patterns such as RFC-3339, RFC-822 and common ISO-8601 variations.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003edate2str\u003c/td\u003e\n\u003ctd\u003eConverts a date into string using a specified format.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003edaysBetween\u003c/td\u003e\n\u003ctd\u003eReturns the number of days between two dates.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eendOfMonth\u003c/td\u003e\n\u003ctd\u003eReturns a date corresponding to the last day of the month given a source date.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eisLeapYear\u003c/td\u003e\n\u003ctd\u003eReturns 1 if the given date or year number is a leap year, i.e., an year with 366 days.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eyear\u003c/td\u003e\n\u003ctd\u003eReturns the year for a given date.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003equarter\u003c/td\u003e\n\u003ctd\u003eReturns the quarter of the year for a given date.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003emonth\u003c/td\u003e\n\u003ctd\u003eReturns the month for a given date, a number starting from 1 (Jan) to 12 (Dec).\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eisoWeekNumber\u003c/td\u003e\n\u003ctd\u003eReturns the ISO week number for a given date.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eweekday\u003c/td\u003e\n\u003ctd\u003eReturns the day of the week of a date, a number from 1 (Sunday) to 7 (Saturday).\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eday\u003c/td\u003e\n\u003ctd\u003eReturns the day of the month for a given date..\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ehour\u003c/td\u003e\n\u003ctd\u003eReturns the hour of day for a given date, as a number from 0 (12AM) to 23 (11PM).\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eminute\u003c/td\u003e\n\u003ctd\u003eReturns the minute within the hour for a given date, as a number from 0 to 59.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003esecond\u003c/td\u003e\n\u003ctd\u003eReturns the seconds within the minute for a given date, a number from 0 to 59.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eaddDays\u003c/td\u003e\n\u003ctd\u003eReturns the result from adding a number of days to a date.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd rowspan=\"2\"\u003e\u003c/b\u003eMath functions\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003earabic\u003c/td\u003e\n\u003ctd\u003eConverts a Roman numeral to Arabic.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eroman\u003c/td\u003e\n\u003ctd\u003eConverts an Arabic numeral to Roman.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\n\u003ctr\u003e\n\u003ctd rowspan=\"2\"\u003e\u003c/b\u003eData manipulation \u0026 filtering\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003expath\u003c/td\u003e\n\u003ctd\u003eReturns the result of the given XPath expression at the specified XML.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ejsonpath\u003c/td\u003e\n\u003ctd\u003eReturns the result of the given JSONPath expression at the specified JSON.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\n\u003ctr\u003e\n\u003ctd rowspan=\"4\"\u003e\u003c/b\u003eStatistical functions\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eaverage\u003c/td\u003e\n\u003ctd\u003eReturns the average of the elements inside a given array, JSON array or collection (including valid representations).\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ecount\u003c/td\u003e\n\u003ctd\u003eReturns the number of elements inside a given array, JSON array or collection (including valid string representations).\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003emax\u003c/td\u003e\n\u003ctd\u003eReturns the largest value in a given array, JSON array or collection (including valid string representations).\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003emin\u003c/td\u003e\n\u003ctd\u003eReturns the smallest value in a given array, JSON array or collection (including valid string representations).\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\n\u003ctr\u003e\n\u003ctd rowspan=\"1\"\u003e\u003c/b\u003eRandom\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003euuid\u003c/td\u003e\n\u003ctd\u003eProduces a randomly generated type 4 UUID (Universally-unique Identifier) string.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\n\u003ctr\u003e\n\u003ctd rowspan=\"8\"\u003e\u003cb\u003eUtility functions\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003edistinct\u003c/td\u003e\n\u003ctd\u003eReturns a list consisting of the distinct elements of a given list, array or JSON array.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003egetEnv\u003c/td\u003e\n\u003ctd\u003eReturns the value of an environment variable.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003egetSystemProperty\u003c/td\u003e\n\u003ctd\u003eReturns the value of system property.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eisDecimal\u003c/td\u003e\n\u003ctd\u003eReturns 1 if the given parameter is a number (including strings) containing decimals.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eisEmpty\u003c/td\u003e\n\u003ctd\u003eReturns 1 if a given parameter is either null or an empty String, JSON or collection.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eisInteger\u003c/td\u003e\n\u003ctd\u003eReturns 1 if the given number (or valid string) represents a whole number, i.e, which lacks decimals.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ereadFile\u003c/td\u003e\n\u003ctd\u003eReturns the content of a text file in the file system.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003etypeOf/class\u003c/td\u003e\n\u003ctd\u003eReturns the Java type associated with the given variable.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\n\u003ctr\u003e\n\u003ctd rowspan=\"3\"\u003e\u003cb\u003eCryptography functions\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003esha256\u003c/td\u003e\n\u003ctd\u003eComputes the SHA-256 hash of the given string and transforms the binary result into a hexadecimal string.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003etoBase64\u003c/td\u003e\n\u003ctd\u003eEncodes a string to Base64 encoding scheme.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003efromBase64\u003c/td\u003e\n\u003ctd\u003eDecodes a Base64 encoded string.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\n\u003ctr\u003e\n\u003ctd rowspan=\"6\"\u003e\u003cb\u003eWeb Services\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003ehttpGet\u003c/td\u003e\n\u003ctd\u003eReturns data from a Web Service or RESTful API, as string.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ehttp\u003c/td\u003e\n\u003ctd\u003eInvokes a specific method towards a Web Service/REST API.\n\u003c/td\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ehttpHeader\u003c/td\u003e\n\u003ctd\u003eThis function groups a variable number of HTTP header entries for usage with other HTTP functions.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ebasicAuthorizationHeader\u003c/td\u003e\n\u003ctd\u003eGenerates a basic authorization header from a given username and password.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ehttpStatusCode\u003c/td\u003e\n\u003ctd\u003eReturns the HTTP status code of a given WebServiceResponse.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003ehttpResponse\u003c/td\u003e\n\u003ctd\u003eReturns the HTTP response body from given WebServiceResponse, as string.\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003c/table\u003e\n\n\u003e ℹ️ [Find examples in the wiki.](https://github.com/oswaldobapvicjr/jep-data-extension/wiki)\n\n---\n\n## Custom operators\n\nJEP offers a good set of operators for common arithmetic and logical operations, for example: addition (`+`), subtraction (`-`), multiplication (`*`), division (`/`), modulus (`%`), power (`^`), \"Boolean And\" (`\u0026\u0026`), \"Boolean Or\" (`||`), and \"Boolean Not\" (`!`). These operators can be used when required and are supported by JEP.\n\n### Comparative operators\n\nStandard JEP relational operators accept only numerical variables (including string representation of non-complex, numerical values). These operators have been overloaded to allow comparison of dates, as well as string representations of valid dates:\n\n- Less than (`\u003c`)\n- Less than or equal to (`\u003c=`)\n- Greater than (`\u003e`)\n- Greater than or equal to (`\u003c=`)\n- Equal (`==`)\n- Not equal (`!=`)\n\nThis allows the usage of dates in expressions that can be evaluated to `true` or `false`. For example:  \n\n```java\nif(\"2017-03-11T10:15:00:123Z\" \u003c now(), \"past\", \"not past\")\n```\n\n### Element operator\n\nStandard \"element\" operator (`[]`) was overloaded to support data extraction out of JSON arrays and other collections by index.\n\n```java\njsonArray[1] //extracts the first element of the given jsonArray\n```\n\n\u003e **Note:** Also achievable using the function `get(jsonArray, 1)`.\n\n---\n\n## How to include it\n\nIf you are using Maven, add **jep-data-extension** as a dependency to your pom.xml file.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003enet.obvj\u003c/groupId\u003e\n    \u003cartifactId\u003ejep-data-extension\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.7\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nIf you use other dependency managers (such as Gradle, Grape, Ivy, etc.) click [here](https://search.maven.org/artifact/net.obvj/jep-data-extension).\n\n---\n\n## How to use it\n\n### Example 1: replacing characters from a text variable using the `JEPContextFactory`\n\n1. Add `jep-data-extensions` to your class path\n\n2. Put your source variables in a map:\n\n    ```java\n    Map\u003cString, Object\u003e myVariables = new HashMap\u003c\u003e();\n    myVariables.put(\"myText\", \"foo\");\n    ```\n\n3. Use the `JEPContextFactory` class to create an extended JEP object with all available extensions:\n\n    ````java\n    JEP jep = JEPContextFactory.newContext(myVariables);\n    ````\n\n    \u003e **Note:** Alternatively, you may use the `JEPContextFactory.newContext()` to receive a new context with no initial variables. You may add them later, calling `jep.addVariable(String, Object)`.\n\n4. Parse your expression:\n\n    ````java\n    Node node = jep.parseExpresion(\"replace(myText, \\\"oo\\\", \\\"ee\\\")\");\n    ````\n\n5. Evaluate the expression with JEP's `evaluate` method:\n\n    ````java\n    String result = (String) jep.evaluate(node); //result = \"fee\"\n    ````\n\n6. Alternatively, you can use the assignment operator inside an expression. The new variable will be available in JEP context for reuse and can be retrieved using the `getVarValue` method:\n\n    ````java\n    Node node = jep.parseExpression(\"myText = replace(\\\"fear\\\", \\\"f\\\", \\\"d\\\")\"));\n    jep.evaluate(node);\n    String result = (String) jep.getVarValue(\"myText\"); //result = \"dear\"\n    ````\n\n\n\n### Example 2: comparing dates using the `ExpressionEvaluatorFacade`\n\nThe `ExpressionEvaluatorFacade` is a convenient object to quickly parse a single expression. A single call to the `evaluate` method will create a new evaluation context and return the expression result directly. It accepts a map with initial variables for use in the operation.\n\n1. Put your source variables in a map:\n\n    ```java\n    Map\u003cString, Object\u003e myVariables = new HashMap\u003c\u003e();\n    myVariables.put(\"date1\", \"2018-12-20T09:10:00.123456789Z\");\n    ```\n\n2. Evaluate your expression:\n\n    ````java\n    String expression = \"if(date1 \u003c now(), \\\"overdue\\\", \\\"not overdue\\\")\";\n    String result = (String) ExpressionEvaluatorFacade.evaluate(expression, myVariables); \n    //result = \"overdue\"\n    ````\n\n\n\n### Example 3: Consuming data from a RESTful API using the Evaluation Console\n\n1. Run `jep-data-extension` JAR file from a terminal:\n\n    ```\n    $ java -jar jep-data-extension-1.0.2.jar\n    ```\n\n2. Consume the RESTful API with the `httpGet` function:\n\n    ```\n    JEP \u003e dateTime = httpGet(\"http://date.jsontest.com/\")\n    {\n       \"time\": \"08:31:19 PM\",\n       \"date\": \"05-12-2012\"\n    }\n    ```\n\n3. Filter the JSON using a JsonPath expression that extracts the date field:\n\n    ```\n    JEP \u003e date = jsonpath(dateTime, \"$.date\")\n    05-12-2012\n    ```\n\n3. Check the type of the generated `date` variable:\n\n    ```\n    JEP \u003e class(date)\n    java.lang.String\n    ```\n\n4. Convert the string to Date:\n\n    ```\n    JEP \u003e date = str2date(date, \"dd-MM-yyyy\")\n    Wed Dec 05 00:00:00 BRST 2012\n    ```\n\n5. Extract the week number from the converted date:\n\n    ```\n    JEP \u003e isoWeekNumber(date)\n    49\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foswaldobapvicjr%2Fjep-data-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foswaldobapvicjr%2Fjep-data-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foswaldobapvicjr%2Fjep-data-extension/lists"}