Imagine the same service serving xml and json. It's come in handy to use
WSDL validation for both protocols to avoid code duplication. Then if we
converting to json structure which came out after XML::Compile
deserialization, floats and decimals will be like "3.14". And then if you
will serve this json to the strict languages like i.e. Java you might have
problems (depends on host strict is json realization).
And if integers are going thru $_[0] += 0, why not doing the same for float
types, when sloppy_floats is on?
I solved my problem via redefining
$XML::Compile::Schema::BuiltInTypes::builtin_types{sloppy_float}
right in my controller, but it you will change this realization in future
versions of XML::Compile, my code will broke. Yes, I could have a unit test
for that, but still.On Sun, Dec 7, 2014 at 3:10 AM, Mark Overmeer <[email protected]> wrote: > * hmepas ([email protected]) [141206 21:13]: > > I stumbled into annoying problem. When I deserializing my XML, I am > getting > > integers as Perl integers, while anything what's sloppy_floats became > > strings. > > You are correct. However, can you explain me why this is an annoying > problem for you? Perl converts strings into floats all the time. > -- > Regards, > > MarkOv > > ------------------------------------------------------------------------ > Mark Overmeer MSc MARKOV Solutions > [email protected] [email protected] > http://Mark.Overmeer.net http://solutions.overmeer.net > > -- Pavel S. Khmelinsky <[email protected]> Jabber: [email protected] Skype: hmepas
_______________________________________________ Xml-compile mailing list [email protected] http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile
