Jira [1] created.

[1] https://wso2.org/jira/browse/DEVTOOLESB-644


Thanks
Godwin


On Fri, Jul 22, 2016 at 9:07 AM, Viraj Rajaguru <vi...@wso2.com> wrote:

> Hi Godwin,
>
> We do not have a Jira for this improvement. Please create a Jira.
>
> Thanks,
> Viraj.
>
> On Tue, Jul 19, 2016 at 7:28 PM, Godwin Shrimal <god...@wso2.com> wrote:
>
>> Hi Viraj,
>>
>> This is not a blocking thing and we can move forward by changing it from
>> the graphical view. But I think we need to figure out the proper way to fix
>> it. Do we have a jira for this already ?
>>
>>
>> Thanks
>> Godwin
>>
>>
>> On Mon, Jul 18, 2016 at 11:47 PM, Viraj Rajaguru <vi...@wso2.com> wrote:
>>
>>> Hi Godwin,
>>>
>>> In this use case, JSON schema generator will consider all the datatypes,
>>> but it will get the datatype of the last value of the array. See the below
>>> JSON representation of the XML
>>>
>>> {
>>>    "employees":{
>>>       "firstname":"Demo",
>>>       "lastname":"Demo",
>>>       "addresses":{
>>>          "address":[
>>>             {
>>>                "add1":"No 827/B",
>>>                "add2":"Gemunu Mawatha"
>>>             },
>>>             {
>>>                "add1":321,
>>>                "add2":"Mount Lavinia"
>>>             }
>>>          ]
>>>       }
>>>    }
>>> }
>>>
>>> Since the datatype of last "add1" is a NUMBER it will take that for the
>>> JSON schema. Hence we see it in the graphical tree.
>>>
>>> Issue is we have to select one of the datatypes among all the datatypes
>>> for the schema. Currently the convention is to get the last datatype. But
>>> as a fix, we can set high priority to STRING when we have to select one
>>> from multiple datatypes.
>>>
>>> Until we figure out that conventional issue, you can change the datatype
>>> of "add1" from the graphical view. Right click on the "add1" element from
>>> the tree --> Click "Edit Field" and then change the Schema type.
>>>
>>> Thanks,
>>> Viraj.
>>>
>>> On Tue, Jul 19, 2016 at 9:02 AM, Nuwan Pallewela <nuw...@wso2.com>
>>> wrote:
>>>
>>>> Adding Sohani
>>>>
>>>> On Tue, Jul 19, 2016 at 12:42 AM, Godwin Shrimal <god...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> When load following xml file in to data mapper (input/output), the
>>>>> add1 data type takes as NUMBER as in screenshot . It looks when there is 
>>>>> at
>>>>> least one record in the array with NUMBER it takes as NUMBER. I think It
>>>>> should consider all the values in the array.
>>>>>
>>>>> <employees>
>>>>> <firstname>Demo</firstname>
>>>>>         <lastname>Demo</lastname>
>>>>>
>>>>> <addresses>
>>>>>           <address>
>>>>>   *<add1>No 827/B</add1>*
>>>>>             <add2>Gemunu Mawatha</add2>
>>>>>           </address>
>>>>>           <address>
>>>>>             *<add1>321</add1>*
>>>>>             <add2>Mount Lavinia</add2>
>>>>>           </address>
>>>>>         </addresses>
>>>>> </employees>
>>>>>
>>>>> [image: Inline image 2]
>>>>> Thanks
>>>>> Godwin
>>>>>
>>>>> --
>>>>> *Godwin Amila Shrimal*
>>>>> Senior Software Engineer
>>>>> WSO2 Inc.; http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> mobile: *+94772264165*
>>>>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
>>>>> twitter: https://twitter.com/godwinamila
>>>>> <http://wso2.com/signature>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ----------------------------------------------------------
>>>>
>>>> *Nuwan Chamara Pallewela*
>>>>
>>>>
>>>> *Software Engineer*
>>>>
>>>> *WSO2, Inc. *http://wso2.com
>>>> *lean . enterprise . middleware*
>>>>
>>>> Email   *nuw...@wso2.com <nuw...@wso2.com>*
>>>> Mobile  *+94719079739 <%2B94719079739>@*
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Viraj Rajaguru
>>> Associate Technical Lead
>>> WSO2 Inc. : http://wso2.com
>>>
>>> Mobile: +94 77 3683068
>>>
>>>
>>>
>>>
>>
>>
>> --
>> *Godwin Amila Shrimal*
>> Senior Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
>> twitter: https://twitter.com/godwinamila
>> <http://wso2.com/signature>
>>
>
>
>
> --
> Viraj Rajaguru
> Associate Technical Lead
> WSO2 Inc. : http://wso2.com
>
> Mobile: +94 77 3683068
>
>
>
>


-- 
*Godwin Amila Shrimal*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
twitter: https://twitter.com/godwinamila
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to