Given a string s containing only the characters '(' and ')', determine whether the parentheses are balanced — every opening parenthesis has a matching closing one in the correct order. Return true or false. The input is JSON {s}.
Input: JSON {s}.
Output: Boolean — true or false.
Input: {"s":"(()())"}
Output: true
Explanation: Every parenthesis is matched.Input: {"s":"(()"}
Output: false
Explanation: One unmatched opening.Input: {"s":")("}
Output: false
Explanation: Closes before it opens.0<=|s|<=10^5s contains only ( and )