Re: [Dev] [EI] JSON null value taking as "null" String

2018-03-07 Thread Godwin Shrimal
Hi Madhawa,

Thanks for the response. Yes, we can pass a null value as you suggested,
But think of a scenario, there are a lot of elements in the payload which
can be null. Then its hard to handle like this.  +1 to fix this.


Thanks
Godwin

On Thu, Mar 8, 2018 at 1:15 PM, Madhawa Gunasekara 
wrote:

> Hi Godwin,
>
> You can try below-mentioned way to pass the null value correctly to the
> data service. IMO, We need to fix this issue. It's not correct to evaluate
> JSON null value as String "null"
>
> 
> 
>  
>  
>http://www.test.com.";>
>   $1
>   $2
>   $3
>
> 
> 
>
>
>
> 
>  
>  
>  
> 
>  
>http://www.test.com.";>
>   * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> " xsi:nil="true"/>*
>   $1
>   $2
>
> 
> 
>
>
> 
>  
>  
>  
>
> Thanks,
> Madhawa
>
> On Wed, Mar 7, 2018 at 7:08 PM, Senduran  wrote:
>
>> Hi Godwin,
>>
>> As a workaround you can try the following.
>>
>> This happens because of the following property contains null as string
>> value
>> > type="STRING"/>
>>
>> So instead of reading the property in the argument, evaluating the JSON
>> path will solve I think
>> i.e
>> 
>>
>> Regards
>> Senduran
>>
>> On Wed, Mar 7, 2018 at 5:13 PM, Godwin Shrimal  wrote:
>>
>>> Hi All,
>>>
>>> If we pass a JSON Payload with a null value, it is considering that null
>>> value as "null" string. Please see a sample API and payload
>>>
>>> API
>>> 
>>>
>>> 
>>>
>>>   
>>>
>>>  >> scope="default" type="STRING"/>
>>>
>>>  >> scope="default" type="STRING"/>
>>>
>>>  >> scope="default" type="STRING"/>
>>>
>>>  
>>>
>>> 
>>>
>>>http://www.test.com.";>
>>>
>>>   $1
>>>
>>>   $2
>>>
>>>   $3
>>>
>>>
>>>
>>> 
>>>
>>> 
>>>
>>> *   *
>>>
>>>
>>>
>>>
>>>
>>> 
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> 
>>>
>>>  
>>>
>>>  
>>>
>>>   
>>>
>>>   
>>>
>>>  
>>>
>>>   
>>>
>>>
>>>
>>> Payload
>>> ==
>>>
>>> {
>>>
>>>"id":null,
>>>
>>>"contractid":"test",
>>>
>>>"dealid":"test1"
>>>
>>> }
>>>
>>> According to above sample highlight argument passing to dss service as
>>> "null" string. It looks this is a bug.
>>>
>>>
>>> Thanks
>>> Godwin
>>>
>>> --
>>> *Godwin Amila Shrimal*
>>> Associate Technical Lead
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94772264165*
>>> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
>>> *
>>> twitter: https://twitter.com/godwinamila
>>> 
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Madhawa Gunasekara*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 719411002 <+94+719411002>
> blog: *http://madhawa-gunasekara.blogspot.com
> *
> linkedin: *http://lk.linkedin.com/in/mgunasekara
> *
>



-- 
*Godwin Amila Shrimal*
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
*
twitter: https://twitter.com/godwinamila

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [EI] JSON null value taking as "null" String

2018-03-07 Thread Madhawa Gunasekara
Hi Godwin,

You can try below-mentioned way to pass the null value correctly to the
data service. IMO, We need to fix this issue. It's not correct to evaluate
JSON null value as String "null"



 
 
   http://www.test.com.";>
  $1
  $2
  $3
   


   
   
   

 
 
 

 
   http://www.test.com.";>
  *http://www.w3.org/2001/XMLSchema-instance
" xsi:nil="true"/>*
  $1
  $2
   


   
   

 
 
 

Thanks,
Madhawa

On Wed, Mar 7, 2018 at 7:08 PM, Senduran  wrote:

> Hi Godwin,
>
> As a workaround you can try the following.
>
> This happens because of the following property contains null as string
> value
>  type="STRING"/>
>
> So instead of reading the property in the argument, evaluating the JSON
> path will solve I think
> i.e
> 
>
> Regards
> Senduran
>
> On Wed, Mar 7, 2018 at 5:13 PM, Godwin Shrimal  wrote:
>
>> Hi All,
>>
>> If we pass a JSON Payload with a null value, it is considering that null
>> value as "null" string. Please see a sample API and payload
>>
>> API
>> 
>>
>> 
>>
>>   
>>
>>  > type="STRING"/>
>>
>>  > scope="default" type="STRING"/>
>>
>>  > scope="default" type="STRING"/>
>>
>>  
>>
>> 
>>
>>http://www.test.com.";>
>>
>>   $1
>>
>>   $2
>>
>>   $3
>>
>>
>>
>> 
>>
>> 
>>
>> *   *
>>
>>
>>
>>
>>
>> 
>>
>>  
>>
>>  
>>
>>  
>>
>> 
>>
>>  
>>
>>  
>>
>>   
>>
>>   
>>
>>  
>>
>>   
>>
>>
>>
>> Payload
>> ==
>>
>> {
>>
>>"id":null,
>>
>>"contractid":"test",
>>
>>"dealid":"test1"
>>
>> }
>>
>> According to above sample highlight argument passing to dss service as
>> "null" string. It looks this is a bug.
>>
>>
>> Thanks
>> Godwin
>>
>> --
>> *Godwin Amila Shrimal*
>> Associate Technical Lead
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
>> *
>> twitter: https://twitter.com/godwinamila
>> 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Madhawa Gunasekara*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 719411002 <+94+719411002>
blog: *http://madhawa-gunasekara.blogspot.com
*
linkedin: *http://lk.linkedin.com/in/mgunasekara
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [EI] JSON null value taking as "null" String

2018-03-07 Thread Senduran
Hi Godwin,

As a workaround you can try the following.

This happens because of the following property contains null as string
value


So instead of reading the property in the argument, evaluating the JSON
path will solve I think
i.e


Regards
Senduran

On Wed, Mar 7, 2018 at 5:13 PM, Godwin Shrimal  wrote:

> Hi All,
>
> If we pass a JSON Payload with a null value, it is considering that null
> value as "null" string. Please see a sample API and payload
>
> API
> 
>
> 
>
>   
>
>   type="STRING"/>
>
>   scope="default" type="STRING"/>
>
>   scope="default" type="STRING"/>
>
>  
>
> 
>
>http://www.test.com.";>
>
>   $1
>
>   $2
>
>   $3
>
>
>
> 
>
> 
>
> *   *
>
>
>
>
>
> 
>
>  
>
>  
>
>  
>
> 
>
>  
>
>  
>
>   
>
>   
>
>  
>
>   
>
>
>
> Payload
> ==
>
> {
>
>"id":null,
>
>"contractid":"test",
>
>"dealid":"test1"
>
> }
>
> According to above sample highlight argument passing to dss service as
> "null" string. It looks this is a bug.
>
>
> Thanks
> Godwin
>
> --
> *Godwin Amila Shrimal*
> Associate Technical Lead
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
> *
> twitter: https://twitter.com/godwinamila
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [EI] JSON null value taking as "null" String

2018-03-07 Thread Godwin Shrimal
Hi All,

If we pass a JSON Payload with a null value, it is considering that null
value as "null" string. Please see a sample API and payload

API




  

 

 

 

 



   http://www.test.com.";>

  $1

  $2

  $3

   





*   *

   

   



 

 

 



 

 

  

  

 

  

   

Payload
==

{

   "id":null,

   "contractid":"test",

   "dealid":"test1"

}

According to above sample highlight argument passing to dss service as
"null" string. It looks this is a bug.


Thanks
Godwin

-- 
*Godwin Amila Shrimal*
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
*
twitter: https://twitter.com/godwinamila

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev