added monkey patch to Object for to_json and made JSON::ParseError not warn if already defined