On Wed, Apr 2, 2014 at 11:35 PM, Sohani Weerasinghe <soh...@wso2.com> wrote:

> Hi,
>
> If I want to create an Avro Schema from XML or XSD which contains nillable
> value as shown below how can I represent it in the Avro Schema ?
>
> xml :  <result xsi:nil="true" ></result>
>
> xsd : <xs:element name="result" type="xs:string" nillable="true"/>
>
> In Avro Schema we can have unions (optional fields) as shown below.
>
> {"name": "result", "type": ["int", "null"]} which means  result can be
> either an int or null.
>

This says , ["int", "null"] declares a schema which may be either a int or
null,
/Jasintha



>
> Since this is not the way of representing nillables, Can someone provide a
> solution to represent nillables in Avro Schema.
>
>
> Thanks,
> Sohani
>
> Sohani Weerasinghe
> Software Engineer
> WSO2, Inc: http://wso2.com
>
> Mobile  : +94 716439774
> Blog     :http://christinetechtips.blogspot.com/
> Twitter  : https://twitter.com/sohanichristine
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Jasintha Dasanayake*

*Software EngineerWSO2 Inc. | http://wso2.com <http://wso2.com/>lean .
enterprise . middleware*


*mobile :- 0711368118*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to