Questions tagged [jolt]

A JSON to JSON transformation library written in Java.

Jolt is a to JSON transformation library written in .

For more information, see the GitHub page.

Latest release: 0.1.6 released on Mar 28, 2022

1312 questions
0
votes
2 answers

JOLT: transform all json elements of type "array"

I would like to convert ALL arrays in a json via JOLT to a list of key-value pairs: input: "ex":{"arr": ["1", "2", "3", "4"]} desired output: "ex-arr-0": "1", "ex-arr-1": "2", ...
Daniel
  • 31
  • 7
0
votes
2 answers

NiFi JoltTransformJSON

NiFi throws an error in the JOLT processor - although the test inside the "advanced" processor interface works flawlessly! Some flowfiles are converted without error - the majority however fail - eg: JSON: { "abc": { "HEADER": { …
Daniel
  • 31
  • 7
0
votes
2 answers

Changing targeted fields with Jolt

I have a couple cases where I need to transform map fields into array fields that are sometimes nested a couple layers deep. These are the only fields that need to change in the document, so the other fields don't need any sort of transformation…
ggeise
  • 467
  • 1
  • 5
  • 9
0
votes
1 answer

I have a simple json file that I'm trying to transform using jolt and having trouble with it since I'm very new to jolt

Here's what I want to do: 1. Concatenate first and last name with name 2. Change id to employeeID and add prefix with employee ID: emp_id 3. If department is equal to sales, than department should be "SL" 4. If department is equal to sales, than…
hukstabal
  • 3
  • 1
0
votes
1 answer

Json transformation from key value to nested array

I was trying to have a key value pair mapped to an array, distinguishing each value as a type using jolt transform spec Input json { "testurl": "someurl", "website": "someurl2" } tried this spec [ { "operation": "shift", "spec": { …
Sandeep Raikar
  • 491
  • 1
  • 6
  • 13
0
votes
2 answers

is there any way to write a null json transformation (passes through orig document) using Jolt?

You know how XSLT and other XML processing languages support the "null transformation" which passes a document through unmodified ? I would like to do the same thing for Jolt (a very nice JSON transformation library used in Apache Camel and other…
Chris Bedford
  • 2,560
  • 3
  • 28
  • 60
0
votes
3 answers

few garbage collections are reported in logs, although our benchmark program creates millions of objects per second

i am benchmarking a JSON transformation library called JOLT. The library looks pretty good but we wanted to make sure that it did not stress our garbage collector too much. I therefore created a small program (reproduced below) that does the…
Chris Bedford
  • 2,560
  • 3
  • 28
  • 60
0
votes
1 answer

Json array transformation using jolt

i want to transform a JSON array, JSON: { "data1": { "data2": [ { "element1": "value1", "entity": [ "array0", { "element2": [ …
user_vs
  • 1,021
  • 3
  • 16
  • 29
0
votes
1 answer

Jolt - recurcive process

I try to flatten some JSON arrays using Jolt. I found how to do it on the first level, but I need to do it "recursively". About the input: the array I want to flatten are name "objects" the inner objects all contain a "name" attribute but the…
GournaySylvain
  • 461
  • 1
  • 3
  • 16
0
votes
2 answers

Jolt transform unnamed array

Using the sample json response from jsonplaceholder.com, I would like to perform a Jolt transformation on the unnamed array that is returned. However, using the jolt demo I have only been able to transform the array after naming the array ("records"…
wesmantooth
  • 625
  • 2
  • 11
  • 29
0
votes
1 answer

Bazaarvoice Jolt Generic Spec for multiple Kinds of Input JSON

I am new to JOLT. I have 2 different set of input json of same structure except one object inside differs based on the decider value like below. Eg: Input json 1 { "input": { "decider": 1, "object1": { "object1Info":…
Balaji Kannan
  • 407
  • 6
  • 24
0
votes
2 answers

Jolt transformation with nested arrays.

I'm trying to write a spec to do the below transformation using jolt transformation. I'm only interested in changing the name of key in json, value should remain same. Help me out. Input Json: [ { "list1": [ { "id":…
0
votes
1 answer

Jolt : Mathematical conditional spec

I have an input as below: { "total": "12", "sub" : [ "6", "6", "4", "8", "12" ] } I want an output as below: [ [6,6], [4,8], [12] ] I want to add the fields into array based on the total of their values, i.e.., each array in output…
yeswanth
  • 1,543
  • 1
  • 11
  • 19
0
votes
2 answers

JOLT spec for permutaion

Could you please help me writing JOLT spec for the following? Input: { "title": [ "vsnu", "anothervsnu" ], "anothertitle": [ "vsnu", "anothervsnu" ] } Expected output: { Response : [ { "head" :…
vsnu
  • 27
  • 6
0
votes
1 answer

How to get multiple array value as object

Hi I am new to JOLT transformation. I need to transform the input json using JOLT to get below seen output. Please help me in below transformation: input: { "image": [ "content1", "content2", "content3" ], "legal": [ …
Manan Kapoor
  • 675
  • 1
  • 11
  • 28