Converts camelCase JavaScript objects to JSON snake_case and vise versa.