I use GameAnalytics RemoteConfigs for the system i am doing and basically it returns the string like {"Type": = "Neutrons","Amount": = 20} but when i try to decode directly it says it can’t parse JSON
I don’t really use that, but I can say It’s not returning a proper JSON format for some reason (keeping the = operator). If it’s absolutely not returning a proper json, you can always string.gsub to replace that pattern.
local response: string -- your returned string
response = string.sub(response, " = ", "")
Well i can control a bit what it returns, what i told it to return is {"Type": = "Neutrons","Amount": = 20} and it return it as a string, so what do i do with the string.sub response, do i put it in the JSONDecode?
Yeah then it should be a proper table. Problem is that the string being returned is not a proper JSON (with extra " = "). Of course, it’d be better if you returned a proper JSON in the first place instead of a malformed one to avoid any unwanted regex operations.