JSON * T_JSON
INPUT
T_JSON
dMY_CXT;
if (!(
SvROK ($arg)
&& SvOBJECT (SvRV ($arg))
&& (SvSTASH (SvRV ($arg)) == JSON_STASH || sv_derived_from ($arg, \"Cpanel::JSON::XS\"))
)) {
if (SvPOK ($arg))
croak (\"string is not of type Cpanel::JSON::XS. You need to create the object with new\");
else
croak (\"object is not of type Cpanel::JSON::XS\");
}
$var = (JSON *)SvPVX (SvRV ($arg));