rurban / Cpanel-JSON-XS

Improved fork of JSON-XS

Home Page:http://search.cpan.org/dist/Cpanel-JSON-XS/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

errors use string overload when printing class name

karenetheridge opened this issue · comments

When trying to encode an object with a string overload, when convert_blessed isn't enabled:

encountered object '... potentially unintelligible or confusing string here', but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing) at ...

This would be more readable:

encountered object 'ClassName=HASH(0xdeadbeef)', but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing) at ...

I wouldn't be surprised if there was an XS function that returned the "default" stringified representation of a ref, bypassing overloads.

Indeed, remove the mlehman wording.

the XS stringification method is already used, but only optionally. It does check for """ overloads AFAIK