From dfaf3fa87ee02229f9b19ef1eb084110e5084758 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sat, 18 Jan 2025 21:09:23 -0500 Subject: [PATCH] [skip ci] json bug testing update --- playlet-lib/src/source/services/HttpClient.bs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playlet-lib/src/source/services/HttpClient.bs b/playlet-lib/src/source/services/HttpClient.bs index a7a9edd2..68fe4dc4 100644 --- a/playlet-lib/src/source/services/HttpClient.bs +++ b/playlet-lib/src/source/services/HttpClient.bs @@ -653,11 +653,12 @@ namespace HttpClient return invalid end if m._json = ParseJson(text) - ' TODO:P2 remove workaround after a fix has landed + ' TODO:P2 remove workaround (fix landed, but remove after March 2025 as a precaution) if m._json = invalid and m.IsSuccess() and not m._json_workaround_tried = true ' A bug was introduced in Roku OS 14.1 that causes ParseJson to return invalid parsing some unicode characters. ' So we filter out \uXXXX characters and try to parse again. ' These characters are mostly emojis, and can't render anyway. + ' Update: a fix has landed in 14.1 (tested on 14.1.4.7709) m._json_workaround_tried = true filter = /\\u[0-9a-fA-F]{4}/ text = filter.ReplaceAll(text, "")