in reply to Re^4: Size of a HASH (with more keys)
in thread Size of a HASH (with more keys)

If you want to output JSON, why don't you use JSON or JSON::Tiny?