Hi Sohani,

+1 for suggestion. This will solve the same issue we are solving
with synapse.commons.json.json.output.autoPrimitive
and synapse.commons.json.json.output.disableAutoPrimitive.regex in
synapse.properties file while XML to JSON conversion in ESB. With
Datamapper we will have more flexibility since we can set the 'Type' per
attribute.

Thanks,
Viraj.

On Fri, Jun 10, 2016 at 4:59 PM, Sohani Weerasinghe <soh...@wso2.com> wrote:

> Hi All,
>
> Since there is already a feature to edit the properties of a particular
> tree node, we can use that to change the data type
>
> Thanks,
> Sohani
>
> Sohani Weerasinghe
> Senior Software Engineer
> WSO2, Inc: http://wso2.com
>
> Mobile  : +94 716439774
> Blog     :http://christinetechtips.blogspot.com/
> Twitter  : https://twitter.com/sohanichristine
>
> On Fri, Jun 10, 2016 at 11:26 AM, Sohani Weerasinghe <soh...@wso2.com>
> wrote:
>
>> Hi All,
>>
>> If we consider a payload which has values such as telephone numbers,
>> userID, house no etc, when generating the JSON schema they are treated as
>> "numbers".
>>
>> When user tries to map the payload, final generated outcome displays as a
>> double value.
>>
>> eg: If we pass an object as below, the output comes as 1.12655655E8 which
>> is wrong.
>>
>> <phone primary="false">
>>       0112655655
>>       <ext>01</ext>
>>    </phone>
>>
>> AFAIU, before generating the mapping config user should be provided with
>> an option to change the data type of that particular field into String. As
>> a solution I think we should provide a property so that user can change the
>> type. WDYT?
>>
>> Thanks,
>> Sohani
>>
>> Sohani Weerasinghe
>> Senior Software Engineer
>> WSO2, Inc: http://wso2.com
>>
>> Mobile  : +94 716439774
>> Blog     :http://christinetechtips.blogspot.com/
>> Twitter  : https://twitter.com/sohanichristine
>>
>
>


-- 
Viraj Rajaguru
Associate Technical Lead
WSO2 Inc. : http://wso2.com

Mobile: +94 77 3683068
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to