Given an array of integers where only the lowest 8 bits of each entry are meaningful, decide whether the data forms a valid UTF-8 encoding. A character occupies one byte starting with 0, or two to four bytes whose leading byte starts with 110, 1110 or 11110 and whose remaining bytes all start with 10.
Input: A JSON object {"data": [<integers>]} where each entry represents one byte.
Output: Return true if the whole array is a valid UTF-8 encoding, otherwise false.
Input: {"data":[197,130,1]}
Output: true
Explanation: A two-byte character followed by an ASCII byte -> true.Input: {"data":[235,140,4]}
Output: false
Explanation: The three-byte lead is not followed by two valid continuations -> false.0 <= len(data) <= 3 * 10^40 <= data[i] <= 255