I could do that with hashes and arrays. But I wouldn't want it for strings for example (and I don't think the PSON implementation can handle it either).

for arrays to_s is already an alias for inspect, so it is pretty much JSON. But for hashes it would be good, sure.