twritejson default type string

Six Stars

twritejson default type string

Hi,
for my client i must produce json files. Somes datatype (id) declared like integer.
after building json tree, I can see my id with double-cote("), like a string
When I run my talend job, i have the "error" message
févr. 18, 2015 10:26:08 PM net.sf.json.xml.XMLSerializer getType
Infos: Using default type string
How can I do to solve my problem? Is any librairy aren't present?
Can you Help me.
thanks
Community Manager

Re: twritejson default type string

Hi
You are getting that message because your root element does declare a type, so it used the default type string. 
It's just an INFO message that don't affect the generated result, if you want to remove it from the console, you just need to add an attribute called "type" to the root element and set a fixed value "string" to it. see 
   
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: twritejson default type string

Thanks for recipe!

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog