* Mark Overmeer ([email protected]) [141207 12:57]:
> * hmepas ([email protected]) [141207 08:58]:
> > Then if we converting to json structure which came out after XML::Compile
> > deserialization, floats and decimals will be like "3.14".
> 
> The patch is accepted for next release.

I have to revert the change, triggered by a failing regression test.

When I read the JSON docs:
   my $value = 5; encode_json [$value]  # yields [5]

   # used as string, so dump as string
   print $value;
   encode_json [$value]                 # yields ["5"]

Your patch does work for simple floats in the XML, but it will not
work for floats which have additional facets (totalDigits, fracDigits,
length).  Those checks are done after stringification.

So, your patch does break validation for everyone.  Any use of facets
will break your JSON trick.  So: your patch does not work.  Sorry.

It would be nice to add an option to JSON to disable its "smart"
behavior.  Application libraries should not look into the SV!
-- 
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       [email protected]                          [email protected]
http://Mark.Overmeer.net                   http://solutions.overmeer.net


_______________________________________________
Xml-compile mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile

Reply via email to