in reply to Re^4: Making JSON::{PP,XS} not decode true/false to JSON::{PP,XS}::Boolean objects (source)
in thread Making JSON::{PP,XS} not decode true/false to JSON::{PP,XS}::Boolean objects
Thanks!
Since, for a boolean type, it is reasonable to implement it as a ref to a scalar (and that is how it has been done over and over in several different JSON modules), I'd just treat a reference to a scalar as a boolean. The only change required is using reftype() or $ref =~ /SCALAR/, as ref() returning exactly "SCALAR" is already handled that way.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Making JSON::{PP,XS} not decode true/false to JSON::{PP,XS}::Boolean objects (\$)
by davido (Cardinal) on Oct 16, 2013 at 16:43 UTC |