JSON query and transformation language

Overview

JSLT

JSLT is a complete query and transformation language for JSON. The language design is inspired by jq, XPath, and XQuery.

JSLT can be used as:

  • a query language to extract values from JSON (.foo.bar[0]),
  • a filter/check language to test JSON objects (starts-with(.foo.bar[0], "http://")) ,
  • a transformation language to convert between JSON formats.

Here is an example transform:

{
    "time": round(parse-time(.published, "yyyy-MM-dd'T'HH:mm:ssX") * 1000),
    "device_manufacturer": .device.manufacturer,
    "device_model": .device.model,
    "language": .device.acceptLanguage,
    "os_name": .device.osType,
    "os_version": .device.osVersion,
    "platform": .device.platformType,
    "user_properties": {
        "is_logged_in" : boolean(.actor."spt:userId")
    }
}

Demo playground.

Language tutorial.

Function documentation.

More examples.

Javadoc.

API introduction.

Build Status

Quick reference

Operation Explanation
. The context node
.<name> Get value of key "<name>" inside an object
.[<index>] Get value <index> inside an array
.[<from> : <to>] Array slicing
if (<expr>) <expr> else <expr> If test to decide which value to return
let <name> = <expr> Define a variable
$<name> Refer to a variable
[for (<expr>) <expr>] Transform an array
{for (<expr>) <expr> : <expr>} Transform an object
def <name>(<name>, <name>...) <expr> Declare a function
// <anything up to end of line> Comment
{ <key> : <expr> } Object constructor
{ <key> : <expr>, * : . } Specify one key, copy rest of input
5 * 7 + 23.2 Arithmetic operations
7 < 5 Comparators
7 < 5 and .foo == "yes" Boolean operators

Using the library

To include JSLT in your project, depend on:

<dependency>
  <groupId>com.schibsted.spt.data</groupId>
  <artifactId>jslt</artifactId>
  <version>0.1.11</version>
</dependency>

At runtime JSLT depends on Jackson, and nothing else.

To transform one JsonNode into another, do:

import com.schibsted.spt.data.jslt.Parser;
import com.schibsted.spt.data.jslt.Expression;

JsonNode input = ...;
Expression jslt = Parser.compileString(transform);
JsonNode output = jslt.apply(input);

For more alternatives, see the javadoc.

Command-line

To run transforms on the command-line, first build with ./gradlew clean shadowJar. Then you can run with:

java -cp build/libs/*.jar com.schibsted.spt.data.jslt.cli.JSLT transform.jslt input.json

The result is written to standard out.

Extension functions

You can implement your own functions and add them to the language. See the extension function tutorial.

Feedback

If you have questions about how to use JSLT, please ask the question on StackOverflow, with the tag jslt.

If you have problems, feature requests, or think you found a bug, please open an issue.

Status

The language design is not finished, so features may be added. The language as it stands is not likely to change.

The entire language is implemented, and all of the function library. Functions may be added.

The language has been used in production at Schibsted since January 2018, performing about 9 billion transforms per day, and many times more queries.

Building JSLT

To build JSLT as a jar file, run ./gradlew jar.

To build a fat jar with all dependencies included, run ./gradlew shadowJar.

To run the tests: ./gradlew check.

There is a pom.xml file, but Maven is not used for building JSLT, and the file is not intended to work. It's only there to make Github dependency tracking work.

More information

Developing a language for JSON processing: video of talk, slides only.

Running the playground yourself

Anthony Sparks is working on a VM-based implementation in Java

A paper describing (among other things) some of the ways Schibsted uses JSLT.

Visual Studio syntax highlighter for JSLT.

Apache Camel JSLT component.

Pincette event sourcing framework uses JSLT.

LICENSE

Copyright (c) 2018 Schibsted Marketplaces Products & Technology AS

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

What is missing

Things to be done:

  • Move the tests out into YAML files.
  • Write a proper spec with EBNF and everything.
  • Fix the syntax ambiguity problem with let and def.
  • Implement toString() throughout the object tree, so that it's possible to turn expressions back to strings.
  • Optimizer:
    • Optimize ... and boolean( ... ) by removing boolean().
    • Implement parse tree traversal API.
    • Make sure entire tree is traversed (inside function decls and variables, for example).
    • Complete constant folding. Particularly constant folding for variables would be valuable.
    • Inlining of functions.
    • Eliminate unused variables.
  • Use property-based testing and fuzz testing to harden the parser.

See also the list of ideas.

Comments
  • Is it possible to give JSLT template along with JSON data as a payload to the POST request and do processing on the data ?

    Is it possible to give JSLT template along with JSON data as a payload to the POST request and do processing on the data ?

    Payload Format :: { [ { "key1" : "value1", "key2" : "value2" }, { "key3" : "value3", "key4" : "value4" }, { "key5" : "value5", "key6" : "value6" } ] , template:{template.jslt} }

    support 
    opened by Sravanksk 18
  • Are there any way to filter out nulls from result?

    Are there any way to filter out nulls from result?

    Hello, I have the following JSLT file:

    {
      "formId": "Company",
      "fieldValues":
        [
            {
                "name": "CompanyName",
                "value": {
                    "en_US": string(.data.companyName)
                }
            },
            if (contains("Android", array(.data.platforms)))
            {
                "name": "PlatformAndroid",
                "value": {
                    "en_US": true
                }
            },
            if (contains("IOS", array(.data.platforms)))
            {
                "name": "PlatformIOS",
                "value": {
                    "en_US": true
                }
            },
            if (contains("MicrosoftStore", array(.data.platforms)))
            {
                "name": "PlatformMicrosoftStore",
                "value": {
                    "en_US": true
                }
            },
            {
                "name": "Pack",
                "value": {
                    "en_US": string(.data.pack)
                }
            }
        ]
    }
    

    But the fieldValues array contains nulls if there are no platforms checked because of the behavior of if statement.

    Before this solution, I tried to iterate over .data.platforms but I couldn't because in this case the result will be a separated array. After that I tried to define a new function for that, but I couldn't.

    Do you have any idea? Thank you.

    support 
    opened by shark300 16
  • How to solve complex Nested Example

    How to solve complex Nested Example

    @larsga and others,

    I have following am struggling to flatten it, need help to understand what I am doing wrong.

    Input [ { "movies": [ { "movie": "The Equalizer II", "properties": { "name": "action", "creationDate": "2018-07-20T03:37:18.190909+00:00" } }, { "movie": "Mamma mia", "properties": { "name": "drama", "creationDate": "2018-07-20T03:37:18.190909+00:00" } } ], "knownas": [ { "movies": "release this week", "properties": { "name": "premierlist", "creationDate": "2018-07-20T03:37:18.190909+00:00" } } ], "top": { "properties": { "name": "new movies", "creationDate": "2018-07-20T03:37:18.190909+00:00" } } }, { "movies": [ { "movie": "Jurassic World: Fallen Kingdom", "properties": { "name": "SiFi", "creationDate": "2018-07-20T03:37:18.190909+00:00" } }, { "movie": "incredibles 2", "properties": { "name": "family", "creationDate": "2018-07-20T03:37:18.190909+00:00" } } ], "knownas": [null], "top": { "properties": { "name": "monthly topper", "creationDate": "2018-07-20T03:37:18.190909+00:00" } } } ]

    output:

    [ { "type": "monthly topper" }, { "type" : "new movies"
    }, { "type" : "premierlist" }, { "name": "The Equalizer II" "type" : "action", "parents" : [{ "type": "new movies" },{ "type": "premierlist" }] }, { "name": "Mamma mia" "type" : "drama", "parents" : [{ "type": "new movies" },{ "type": "premierlist" }]
    }, { "name": "Jurassic World: Fallen Kingdom" "type" : "drama", "parents" : { "type": "monthly topper" }
    }, { "name": "incredibles 2" "type" : "drama", "parents" : { "type": "monthly topper" }
    } ]

    currently, I have the following transformation

    [for (.[0:]) {"type": .top.properties.name}, [for (.movies){ "name": .movie, "type": .properties.name }] ]

    opened by pratikpparikh 16
  • Is there an easy way to do trimming, padding and replace of strings in jslt?

    Is there an easy way to do trimming, padding and replace of strings in jslt?

    Hello,

    We are using JSLT to achieve dynamic mapping configurations. But couldn't find a quick way to do string functions like trim, padding, replace etc.

    Would you have any pointers for the same?

    enhancement 
    opened by NairR9 13
  • JSLT does not produce itself: empty objects

    JSLT does not produce itself: empty objects

    Hi there,

    Just getting started with JSLT so may have misunderstood something, but I would have expected this JSLT program to be self-producing: {"foo": {}}

    Instead the playground outputs an empty object: { }

    The behavior seems to be that if a dictionary value is the empty object anywhere in the JSON document, then the key is omitted from the output. Is this expected?

    enhancement 
    opened by vectro 13
  • Filter array

    Filter array

    source ==>

    "info":[ {"age":"18","name":"bob"}, {"age":"50","name":"jack"} ]


    target ==>

    info2: [for(.info)

    // todo : i want to get item where name > 20 , what shoud i do , Can someone help me ? { "age2" : .age, "name2" : .name }

    ]

    Desired outcome

    "info2":[ {"age":"50","name":"jack"} ]

    support 
    opened by Boy2ang 12
  • Add parse_url function

    Add parse_url function

    Consider adding a function parse_url() so that it decomposes the url in it's component as a JSON object.

    To illustrate:

    The following JSTL expression

    parse_url('https://www.aftonbladet.se/nyheter/a/opyK1R/snosmocka-pa-ingang--kan-bli-20-centimeter?utm_source=aaaa&utm_campaign=bbbb&utm_medium=cccc&utm_content=dddd&utm_term=eeee')
    

    would evaluate to

    {
      "fragment": null,
      "host": "www.aftonbladet.se",
      "parameters": {
        "utm_campaign": "bbbb",
        "utm_content": "dddd",
        "utm_medium": "cccc",
        "utm_source": "aaaa",
        "utm_term": "eeee"
      },
      "path": "nyheter/a/opyK1R/snosmocka-pa-ingang--kan-bli-20-centimeter",
      "port": null,
      "query": "utm_source=aaaa&utm_campaign=bbbb&utm_medium=cccc&utm_content=dddd&utm_term=eeee",
      "scheme": "https"
    }
    

    Use case: This function would allow to write transformations that extract UTM tags from the URL.

    enhancement 
    opened by ecerulm 11
  • For loop expression index / context?

    For loop expression index / context?

    Hi, I was wondering if it is possible to get the index of the current item when doing some transformation inside a "for" expression?

    For example for the input:

    { "rows" : [
    {"name":"test"},
    {"name":"test 2"}
    ]}
    

    I would like to add row number entries like:

    { "rows" : [
    {"name" : "test", "rowNo" : 1},
    {"name" : "test 2", "rowNo" : 2}
    ]}
    

    I was able to achieve this using functions like this (functions are borrowed from issue #122):

    let rows = .rows
    
    def index-of(array, value)
      find-index-of($array, $value, 0)
    
    def find-index-of(array, value, index)
      if ($index >= size($array))
        -1
      else if ($array[$index] == $value)
        $index
      else
        find-index-of($array, $value, $index + 1)
    
    { "rows" : [ for (.rows) {
    let rn = index-of($rows, .) + 1
    "name":.name,
    "rowNo": $rn
    }]}
    

    However, I wonder if there is a better way or if some variable (automatically set to proper value) could be added to for expression automatically to achieve same goal with simpler JSTL code, for example:

    { "rows" : [ for (.rows) {
    "name":.name,
    "rowNo": $forIdx + 1
    }]}
    

    Thanks :)

    enhancement 
    opened by vvidovic 9
  • get index of element in array

    get index of element in array

    Hi, I did not find mention of a "indexOf" function. Given an array the function would act like

    let array = array(["toto", "tutu", "tata"])  
    $array.indexOf("toto") // return 0
    $array.indexOf("tata") // return 2
    

    Is there such function? Thank you!

    enhancement 
    opened by mathiaHT 9
  • Provide a means to change the context node

    Provide a means to change the context node

    Input

    {
      "a": {
        "b": 1,
        "c": 2, 
        "d": 3
      } 
    }
    

    I want to simplify [ .a.b, .a.c, a.d ] to .a | [.b, .c, .d]. The idea is that the context node . inside [.b, .c, .d] no longer points to the input node but to .a instead.

    enhancement 
    opened by ecerulm 9
  • Iterate through 2 arrays at the same time

    Iterate through 2 arrays at the same time

    Hello ! I have

    let array1 = [
      {...},
      {...}
    ]
    
    let array2 = [
      {...},
      {...}
    ]
    

    I need to have access at array1[0] when i'm treating array2[0], as well, as array1[1] when i'm treating array2[1] and so on, I need to iterate in both of them as the same rythm, supposing then that they have the same size.

    I don't see how I can progress in both of them at the same time with JSLT, is there something that I am missing ?

    Thank you for reading !

    Best regards

    support 
    opened by Psycokwet 8
  • I want to call external java method in jslt during transformation, is it possible???

    I want to call external java method in jslt during transformation, is it possible???

    Example input json { "abc":"abc" }

    output { "abc": this value should come from a java method call }

    Then how do we write the jslt rule.

    support 
    opened by vermaamrita 3
  • Variables, Scope and Import

    Variables, Scope and Import

    I'm passing in a variable prior to calling the template. The primary file (root.jslt) can access the variable.

    let identifier = $headers.Identifier
    
    { "id": $identifier, ... }
    

    Now I have a second jslt file which I import within root

    import "client.jslt" as client
    

    When declaring the following within client.jslt

    let identifier = $headers.Identifier
    

    I get the exception "No such variable $headers"

    if I remove the let statement from the root.jslt (i.e., don't use it in that file) then client.jslt works! It appears that once you use the variable in any file it is no longer available? Creating a common.jslt and including that in both also doesn't work.

    Ron

    support 
    opened by ronMilne 2
  • JsltJsonFilter clarification

    JsltJsonFilter clarification

    Can a jslt filter achieve the following?

    Given the Json

    {
      "clientNames": [
        {
          "type": "Name",
          "clientNameTypeCode": 634,
          "startDate": "2022-09-06",
          "inModeCode": "U"
        }
      ],
      "client": {
        "clientIdentifiers": [
          {
            "identifierTypeCode": 25,
            "identifierStatus": "REGD",
            "identifierStartDate": "2022-09-06"
          },
          {
            "identifierTypeCode": 525,
            "identifierTypeCodeDecode": "Entity",
            "identifierLatestIndicator": "Y",
            "identifierStartDate": "2022-09-06",
            "inModeCode": "I"
          }
        ],
        "clientInternalId": "<<unknown>>",
        "Id": "1d21044e7cd4a593c2046503a09dc653"
      },
      "domain": "clients"
    }
    

    I need the tree structure to only include nodes that contain inModeCode and produce the following

    {
      "clientNames": [
        {
          "type": "Name",
          "clientNameTypeCode": 634,
          "startDate": "2022-09-06",
          "inModeCode": "U"
        }
      ],
      "client": {
        "clientIdentifiers": [
          {
            "identifierTypeCode": 525,
            "identifierTypeCodeDecode": "Entity",
            "identifierLatestIndicator": "Y",
            "identifierStartDate": "2022-09-06",
            "inModeCode": "I"
          }
        ]
      }
    }
    

    Any help in how to achieve this would be greatly appreciated. Ron.

    opened by ronMilne 0
  • Support for processing nested JSON

    Support for processing nested JSON

    JSLT needs better support for processing nested JSON structures. We'll work on ideas and possible designs later. For now, this issue exists to capture examples of use cases that we need to support.

    • Simple two-level nesting: #267 and #268.

    Feel free to suggest more use cases in the comments.

    enhancement 
    opened by larsga 0
  • Unable to retrieve the values of the nested loops using JSLT

    Unable to retrieve the values of the nested loops using JSLT

    I want to retrieve the nested array "contacts" values. But when I tried with .contacts, I am not able to get the values of the contact array fields from the input json. Please help me on this. Below is the Input structure and the JSLT transformation being used:

    +++++++++++++++++++++++++++input+++++++++++++++ [ { "a" :"12", "b" :"13", "contacts": [ { "Id": "1", "Contact_Id": "1234"

          },
          {
              "Id": "2",
              "Contact_Id": "877656554"
              
          },
    

    { "Id": "3", "Contact_Id": "333333"

          }
      ]      
    

    }, {

    "a" :"12", "b" :"13",
    "Watercraft_AdditionalInterests": [ { "Id": "4", "Contact_Id": "77777" }, { "Id": "5", "Contact_Id": "888888"

          },
          {
              "Id": "6",
              "Contact_Id": "9999999"
              
          }
      ]      
    

    } ]

    ++++++++++++++++JSLT+++++++++++

    def range(length, list) if (size($list) < $length) range($length, $list + [size($list)]) else $list

    def zip(arr1, arr2)[ for (range(size($arr1), []))[$arr1[.], $arr2[.]]]

    {

    "requests": flatten(zip([
    

    for (.) {

    "body": {
          "data": {
              "attributes": {
                "a" : .a,
                "b" : .b
              }
    		} 
    
        }
       }
    

    ],

    [ for(..contacts){

    "body": { "data": { "attributes": { "contact": { "code": "contact" }, "contacts": { "id": ..Id, "contact id" : ..Contact_Id

                        }
                    }
                }
            }
        }]
    

    )) }

    opened by gvishu 1
Releases(0.1.14)
  • 0.1.14(Nov 9, 2022)

    Issue #160 was fixed in this release, solving a relatively serious bug, so upgrading is recommended.

    The Jackson dependencies were also upgraded, to avoid versions with known vulnerabilities.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.13(Sep 4, 2022)

    This version was released to fix a threading issue in the sha256-hex function (issue #261).

    In addition, it also removes usage of some deprecated Jackson APIs.

    There are no other changes.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.12(May 19, 2022)

    This release adds the uuid() built-in function, and a couple of minor improvements. Parsing of decimal numbers in the number() function has been improved to handle larger decimals. Also, syntax errors in regular expressions are now detected at compile time when possible.

    Thanks to @fuchsst for the design and implementation of the uuid() function!

    Source code(tar.gz)
    Source code(zip)
  • 0.1.11(Dec 2, 2020)

    This release fixes a serious bug in the number() function that returned wrong results when converting strings into negative decimal numbers (issue #160).

    Other than that, what is new in this release compared to 0.1.10 is what was added in the 0.1.11-beta:

    When creating objects for output the key can now be computed with a JSLT expression.

    Three functions have been added:

    zip-with-index
    zip
    index-of
    

    And, finally, the JSLT implementation has been made fully thread-safe by making the regular expression cache thread-safe.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.11-beta-1(Aug 18, 2020)

    This beta release adds one language extension, three functions, and fixes one bug.

    When creating objects for output the key can now be computed with a JSLT expression.

    Three functions have been added:

    • zip-with-index
    • zip
    • index-of

    And, finally, the JSLT implementation has been made fully thread-safe by making the regular expression cache thread-safe.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.10(Jun 21, 2020)

    The main change in this release is the new pipe operator |, which allows you to set the context node explicitly. The most obvious use case for it is to select a source JSON object to do object matching, but it can be used for many other things, too. Many thanks to @ecerulm for contributing the implementation!

    Other changes:

    • The parse-url function has been added, designed and implemented by @ecerulm
    • A bug in the parsing of escape sequences inside strings was fixed by @biochimia
    Source code(tar.gz)
    Source code(zip)
  • 0.1.9(Mar 5, 2020)

    Language changes:

    • New functions min() and max() added
    • New function hash-int added (thanks to @ecerulm)
    • null + object now produces the object (not null)
    • null + array now produces the array (not null)

    API changes:

    • FileSystemResourceResolver added (thanks to @ngsoftwaredev)
    • Made it possible to configure encoding on resolvers

    Bug fixes:

    • Support leading zeroes in strings passed to number() (issue #112)
    • Support Cyrillic characters in string literals (issue #115)
    • Upgraded to Jackson 2.10.3 (security fixes)
    • Handle null being returned from Java extension functions
    • Avoid NullPointerException when statically wrapped method does not exist
    Source code(tar.gz)
    Source code(zip)
  • 0.1.8(Jun 1, 2019)

    Not so many changes in this version, which is being released because of the bug fix:

    • Bug fix for issue #70: variable optimization issue in for loops
    • Allow trailing commas in objects and arrays (thanks to @ecerulm for this change (see #72))
    • Upgraded to Jackson 2.9.9
    Source code(tar.gz)
    Source code(zip)
  • 0.1.7(Apr 6, 2019)

    The following extensions have been made:

    • Which values are included in JSON objects is now configurable (by default keys = null are omitted),
    • The replace function was added
    • The trim function was added

    The following bugs have been fixed:

    • Made JSLT work on JDK 11 by removing javax.* dependency
    • Fixed a bug with variable references and array slicers
    Source code(tar.gz)
    Source code(zip)
  • 0.1.6(Jan 28, 2019)

    Some language improvements:

    • it used to be impossible to declare global variables in modules and then refer to them from functions. This now works.
    • JSLT now forbids object literals that contain the same key twice.
    • JSLT now depends on Jackson 2.9.8.

    One function has been added:

    • mod(a, b) to compute a modulo b. (Thank you to @ecerulm for work on this!)

    This version has been optimized in several ways:

    • variables that are used only once, or that have constant values, are now optimized away completely
    • operations involving two literals are now performed at compile-time,
    • the internal representation of variables is now much faster, and
    • if b in contains(a, b) is a large array literal, the optimizer now replaces this with a hashset lookup, instead of doing a linear search.
    Source code(tar.gz)
    Source code(zip)
  • 0.1.5(Dec 3, 2018)

    Functions added:

    • sha256 (contributed by @paurue)
    • sum
    • any (contributed by @ecerulm)
    • all (contributed by @ecerulm)

    Bugs fixed:

    • number(<input>, <fallback>) now handles the input not being a string or a number,
    • issue #41: NullpointerException in object matcher, and
    • issue #9: Make operators left-associative instead of right-associative
    Source code(tar.gz)
    Source code(zip)
  • 0.1.4(Oct 8, 2018)

  • 0.1.3(Aug 14, 2018)

    This release sees one language extension, a new function, one optimization, and bug fixes. Huge thanks to @vectro for contributions.

    Language changes:

    • Added if filters in array and object comprehensions
    • The flatten() function was added

    Optimizations:

    • Tiny optimization in object comprehensions

    Bug fixes:

    • Implemented let inside object comprehensions
    • Fix round-tripping bug in date parsing/formatting (resolved #8), thanks to @vectro
    • Bug fix and improvement to the number() function, thanks to @vectro
    • Bug fix in date parsing/formatting (2 milliseconds off), thanks to @vectro
    Source code(tar.gz)
    Source code(zip)
  • 0.1.2(Jul 12, 2018)

    This version fixes a number of bugs and some cases of bad behaviour. One extra argument was added to the get-key function. Otherwise no language changes.

    The changes:

    • Implemented size bounds on the regexp cache to prevent it from consuming too much memory
    • Fixed error parsing float literals ending with E9 and similar
    • Fixed bad behaviour causing order of keys in JSLT template to be reversed
    • Fixed bug when comparing with null
    • Fixed bug in to-json function
    • Fixed bug in format-time function
    • Added fallback argument to get-key function
    • Support for more types in FunctionWrapper
    • Upgraded to Jackson 2.9.6

    The released version is available from Maven Central.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Jun 14, 2018)

    Minor feature extension allowing clients to control how references to JSLT modules are resolved. Earlier they were only loaded from the classpath, but now clients can resolve them any way they wish. The default remains to load them from classpath.

    <dependency>
      <groupId>com.schibsted.spt.data</groupId>
      <artifactId>jslt</artifactId>
      <version>0.1.1</version>
    </dependency>
    
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Jun 14, 2018)

    The first official release, available from Maven Central at:

    <dependency>
      <groupId>com.schibsted.spt.data</groupId>
      <artifactId>jslt</artifactId>
      <version>0.1.0</version>
    </dependency>
    
    Source code(tar.gz)
    Source code(zip)
Owner
Schibsted Media Group
Schibsted Media Group
JSON to JSON transformation library written in Java.

Jolt JSON to JSON transformation library written in Java where the "specification" for the transform is itself a JSON document. Useful For Transformin

Bazaarvoice 1.3k Dec 30, 2022
Convert Java to JSON. Convert JSON to Java. Pretty print JSON. Java JSON serializer.

json-io Perfect Java serialization to and from JSON format (available on Maven Central). To include in your project: <dependency> <groupId>com.cedar

John DeRegnaucourt 303 Dec 30, 2022
A query language for JSON and a template engine to generate text output.

Josson & Jossons Josson is a query language for JSON. Jossons is a template engine to generate text output. Features and Capabilities of Josson Query

Octomix Software 16 Dec 14, 2022
Sawmill is a JSON transformation Java library

Update: June 25, 2020 The 2.0 release of Sawmill introduces a breaking change to the GeoIpProcessor to comply with the updated license of the MaxMind

Logz.io 100 Jan 1, 2023
Generate Java types from JSON or JSON Schema and annotates those types for data-binding with Jackson, Gson, etc

jsonschema2pojo jsonschema2pojo generates Java types from JSON Schema (or example JSON) and can annotate those types for data-binding with Jackson 2.x

Joe Littlejohn 5.9k Jan 5, 2023
Essential-json - JSON without fuss

Essential JSON Essential JSON Rationale Description Usage Inclusion in your project Parsing JSON Rendering JSON Building JSON Converting to JSON Refer

Claude Brisson 1 Nov 9, 2021
A simple java JSON deserializer that can convert a JSON into a java object in an easy way

JSavON A simple java JSON deserializer that can convert a JSON into a java object in an easy way. This library also provide a strong object convertion

null 0 Mar 18, 2022
A 250 lines single-source-file hackable JSON deserializer for the JVM. Reinventing the JSON wheel.

JSON Wheel Have you ever written scripts in Java 11+ and needed to operate on some JSON string? Have you ever needed to extract just that one deeply-n

Roman Böhm 14 Jan 4, 2023
A JSON Transmission Protocol and an ORM Library for automatically providing APIs and Docs.

?? 零代码、热更新、全自动 ORM 库,后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构。 ?? A JSON Transmission Protocol and an ORM Library for automatically providing APIs and Docs.

Tencent 14.4k Dec 31, 2022
A Java serialization/deserialization library to convert Java Objects into JSON and back

Gson Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to a

Google 21.7k Jan 8, 2023
Screaming fast JSON parsing and serialization library for Android.

#LoganSquare The fastest JSON parsing and serializing library available for Android. Based on Jackson's streaming API, LoganSquare is able to consiste

BlueLine Labs 3.2k Dec 18, 2022
A modern JSON library for Kotlin and Java.

Moshi Moshi is a modern JSON library for Android and Java. It makes it easy to parse JSON into Java objects: String json = ...; Moshi moshi = new Mos

Square 8.7k Dec 31, 2022
A JSON Schema validation implementation in pure Java, which aims for correctness and performance, in that order

Read me first The current version of this project is licensed under both LGPLv3 (or later) and ASL 2.0. The old version (2.0.x) was licensed under LGP

Java Json Tools 1.5k Jan 4, 2023
A universal types-preserving Java serialization library that can convert arbitrary Java Objects into JSON and back

A universal types-preserving Java serialization library that can convert arbitrary Java Objects into JSON and back, with a transparent support of any kind of self-references and with a full Java 9 compatibility.

Andrey Mogilev 9 Dec 30, 2021
Framework for serialization to Json, XML, Byte and Excel, therefore an oviparous wool milk sow J

NetworkParser Framework for serialization from Java objects to Json, XML and Byte. NetworkParser is a simple framework for serializing complex model s

Fujaba Tool Suite 4 Nov 18, 2020
Java libraries for serializing, deserializing, and manipulating JSON values

java-json-toolkit The json-toolkit repository contains the code to the following libraries: json-toolkit-text: basic library for conversion between te

d-coding GmbH 2 Jan 26, 2022
A toy compiler that translates SysY (a subset of C language) into ARMv7a, implemented in Java15.

北京航空航天大学 No Segmentation Fault Work 队作品。 ayame A toy compiler that translates SysY (a subset of C language) into ARMv7a. Build javac -encoding UTF-8 $

null 57 Jan 2, 2023
High performance JVM JSON library

DSL-JSON library Fastest JVM (Java/Android/Scala/Kotlin) JSON library with advanced compile-time databinding support. Compatible with DSL Platform. Ja

New Generation Software Ltd 835 Jan 2, 2023
High-performance JSON parser

HikariJSON A High-performance JSON parser. HikariJSON is targeted exclusively at Java 8. If you need legacy support, there are several decent librarie

Brett Wooldridge 454 Dec 31, 2022