Split by JSON returning an error when there is no error

Hello, all!
I've been running into an issue with the following block:
Cohere Project script pic

I have the following list:
Screenshot 2023-03-07 10.28.02 AM

I use the following block to programatically get the JSON string {“next”: “ask”, “details”: {“for”: “generate-Character”, “theme”: “uwu boi uwu”}} from the list.
Cohere Project script pic (1)

The block works:
Cohere Project script pic (3)

The JSON string is valid JSON. See this screenshot from https://jsonformatter.curiousconcept.com:
Screenshot 2023-03-07 10.37.43 AM

However, when I put the blocks together, I get the following error:
Cohere Project script pic (2)

What is going wrong?

EDIT: The issue is not with the removal of spaces in the latest [] in [] block.

Can you share a mini project with the problem you are encountering?

Really ???

  • Info: Replaced incorrect quotes.

These jokes with the indistinguishable UNICODE equivalent of the ASCII character were not funny at all.
untitled script pic - 2023-03-07T192820.281

what a humorously unfortunate predicament! at least it's somewhat noticeable that they're "fake" quotation marks if you look hard enough, unlike U+037E (Greek question mark) and the semicolon.

a little off topic, but interestingly, the rust compiler has a specific error message for if you mistakenly use a Greek question mark instead of a semicolon.

@pajamaclaws21 did you type in the json manually?
what device and operating system are you using?

The JSON was generated by a text-generating AI through Cohere.ai. I'm making an application that uses the generated JSON.

Oh! I think I get the issue now. I believe the issue may be with my prompts.

EDIT: The issue was with my prompts! They were using the "fake" quotation marks @pumpkinhead mentioned. I've changed them all to Operator reporter; unicode 34 as letter .

Then that's your problem. AI will sometimes do unexpected things like this to make it seem more like a human. Just split the text by and append " to each item (excluding the last), then join them all back together.

There are many, many examples of different Unicode characters that look the same, partly because languages borrow glyphs from each other. The folks in charge of Unicode need to develop a Web API server that you send a string and it sends back a canonical version of the string in which all decorations (font, style, capitalization (okay, make that one optional in the API), size, baseline height, etc.) are removed and then each character is replaced with the lowest Unicode value that produces the same appearance. This would be super useful to implement equality checks for user-entered text. Is there already such a thing?

PS It should also optionally check short substrings, such as turning '' (character 39 twice) into " (character 34).

Made this a while ago for a seperate project: Snap! Build Your Own Blocks
However, it only has letters in its database, not symbols