Comments (6)
Anything new on this subject ?
It's really a bug more than an enhancement for me :/
As for now, there is no way to build the flowing JSON :
[
{
"id":1
"payload": [
{"value": "123"},
{"value": "456"}
]
},
{
"id":2
"payload": []
}
]
from talendcomp_tjsondoc.
I will check that now. In my projects this was not an issue because we do not expect an empty array - actually I was forced to remove empty arrays.
from talendcomp_tjsondoc.
I have checked this issue and I do not have a solution which creates and empty array by the data from the referencing components via foreign key relations in case of there is no child record.
The problem is because I have no record I do not have a foreign key and cannot address the parent object. The only way is to write an empty array while writing the parent object.
I am thinking about a function which checks at the end of the flow to add empty arrays for not referenced parent objects.
from talendcomp_tjsondoc.
You can use a workaround (actually it is a good solution) and add the empty array just in the parent object while filling it.
You could write simply the "payload" attribute in the parent with "[]" as value and mark this column as "Is a JSON object" (means it will take this empty array as real array and not as String.
from talendcomp_tjsondoc.
I'll try that now, I was playing with an empty List in my tMap for the parent, but without success.
The string []
as JSON didn't hit my mind, but that'll probably do exactly what I want.
This is a great set of component you've made ;)
If I figure exactly how everything work, I'll probably make a pull request to improve the example documentation, if you don't mind.
BTW, The compatibility is for 6.*, but I'm using it with 5.6 without any problem, do you know some bug with 5.6 or it's just not officially supported ?
from talendcomp_tjsondoc.
This component works also in 5.x projects. I have a customer doing that.
from talendcomp_tjsondoc.
Related Issues (20)
- Improve Error message from Validation HOT 3
- Add `Die on error` feature HOT 3
- Error type on tJSONDocOpen/Save HOT 3
- SLF4J: Class path contains multiple SLF4J bindings HOT 8
- Performence issus when making 6 deeps HOT 6
- tJSONDocOpen HOT 1
- Value if attribute is missing HOT 2
- tJSONDocOpen/Save: Read JSON schema from file HOT 1
- Schema Validation: Allow filtering of rejects HOT 3
- POM build fails due to missing dependency `talend-job-mock` HOT 1
- failure while streaming multiple array elements HOT 2
- CREATING JSON FORMAT IN TALEND (LOOPS AND ARRAYS IN SIDE AN OBJECT) HOT 2
- support for log4j2 HOT 1
- Json Schema validator can't find the type mismatch error with sting in INT field HOT 7
- Is it working on version 7.3 of Talend Open Studio for Data Integration HOT 2
- tJSONDocInputStream error HOT 5
- de.jlo.talendcomp.json.JsonDocument nβest pas reconnu comme type valide HOT 7
- [tJSONDocInputStream] Trouble with backslashes in json field HOT 9
- IllegalStateException:Cloned objects detected! Use the latest Jayway library 2.2.1+ HOT 3
- There is an issue with the content of the rows listed in tJSONDocInputStream
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from talendcomp_tjsondoc.