to_json uses a small proc to check if all keys of an object are strings. It was always returning false for any input.