Token problem in Kodular

Hello everyone,

I’m currently facing a significant challenge in extracting a single data point (a token) from the JSON string received in the response Content of my Kodular (or App Inventor) Web.GotText event.

I am unable to successfully parse the data using:

  1. JSON Decoding: Attempts to use the built-in Dictionaries.JSON Text Decode block fail, potentially due to hidden characters or encoding issues in the response.
  2. String Manipulation (replace all text): Aggressive string manipulation to isolate the token has also failed, likely due to difficulties in accurately matching the JSON characters (quotation marks and escapes) within the Kodular blocks.
    I am looking for a reliable method to isolate and extract the token value from the raw response string.
    Has anyone encountered this specific issue with JSON/string parsing failure in Kodular, and what was your solution for isolating a single value?
    {“success”:true,“message”:“Kod uspešno generisan.”,“token”:“751463”}

Hi Zeljko

I think the problem is and
do two replacements with " instead.

Hi,
replace all curly with straight "

beacuse JSON takes only straight " quotes.

If it still not fixed, let us know.

Isn’t that exactly the same thing I wrote?
:grin:

1 Like

Thank you for the advice! You’re absolutely right about the quotation marks. I tried every possible combination, but I completely overlooked the specific type of quotation mark being used.

1 Like

Thank you both!

we type at same time, not checked what you respond. bdw yeah thats main issue in his block.

feel free to mark as solved.