Thanks Raul.  Saved me ton of time.
Appreciate your help.
Date: Tue, 4 Jun 2013 03:06:33 -0700
From: ml-node+s465427n5733786...@n5.nabble.com
To: surendrapam...@hotmail.com
Subject: Re: camel-xmljson



        Hi Surendra,


My tests show that the underlying json-lib is very sensitive to whitespaces

in the input XML.

Removing inter-element whitespaces / XML indentation / pretty-print does

the trick.


So if you marshal this XML into JSON:


<root><aps><alert>this is a test

message</alert></aps><key3>value3</key3><key2>value2</key2><key1>value1</key1></root>


You get:


{"root":{"aps":{"alert":"this is a test

message"},"key3":"value3","key2":"value2","key1":"value1"}}


You can remove XML indentation by running an identity XSLT with xsl:output

indent=no.


Hope that helps,


*Raúl Kripalani*

Enterprise Architect, Open Source Integration specialist, Program

Manager | Apache

Camel Committer

http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk


On Mon, Jun 3, 2013 at 7:33 PM, Surendra <[hidden email]> wrote:


> Thank you.

>

> Date: Mon, 3 Jun 2013 08:53:18 -0700

> From: [hidden email]

> To: [hidden email]

> Subject: Re: camel-xmljson

>

>

>

>         I'll take a look at it later.

>

>

> Regards,

>

>

> *Raúl Kripalani*

>

> Enterprise Architect, Open Source Integration specialist, Program

>

> Manager | Apache

>

> Camel Committer

>

> http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
> http://blog.raulkr.net | twitter: @raulvk

>

>

> On Mon, Jun 3, 2013 at 4:02 PM, Surendra <[hidden email]> wrote:

>

>

> > Did anybody came across this issue? any clues?

>

> >

>

> >

>

> >

>

> > --

>

> > View this message in context:

>

> > http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733712.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.

>

> >

>

>

>

>

>

>

>

>

>

>

>

>

>                 If you reply to this email, your message will be added to

> the discussion below:

>

> http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733722.html
>

>

>

>                 To unsubscribe from camel-xmljson, click here.

>

>                 NAML

>

>

>

>

> --

> View this message in context:

> http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733742.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

>



        
        
        
        

        

        
        
                If you reply to this email, your message will be added to the 
discussion below:
                
http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733786.html
        
        
                
                To unsubscribe from camel-xmljson, click here.

                NAML
                                                  



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733807.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to