-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON validation fails during compilation for JSON variables with (unquoted) number fields #136
Comments
Thank you for the comprehensive review of the issue! Right now, JSON usage in the App Store version is very finicky. The Open-Jellycuts version fairs much better but still has its own issues. As for the issue you are seeing, from what I can tell, it is not a currently supported use case.
When the above code is compiled, the Jelly compiler will not paste the value of the dictionary in to validate it as a string. I believe this bug appeared when I reworked how variables can be typed out, which lost the ability to use them as dictionaries. As of right now, there is not yet a way to fix this on the App Store version. I would gladly add you to the TestFlight version, which is where I will focus future fixes. |
The reason nothing is showing up is that the App Store version is not running the Open-Jellycore parser yet. When I get through finals season, I will be taking a bit to finish up Open-Jellycore / Jellycuts |
Understood, and thanks for the quick response! I'm relieved to see that development is ongoing, and not at all surprised at the issues due to App Store and other iOS limitations. Not my area of expertise, but I empathize with devs in Apple's ecosystem. Side note: Now that I see development is an ongoing effort, I'll report another issue I found where |
Ok, I'm up and running on the TestFlight version (with another purchase of the Pro unlock, you crafty devil!), and the JSON issues aren't alleviated. Now, running a slightly modified example for
Throws (approximately, this is using OCR since I was unable to select text from the console):
I'm happy to troubleshoot, if it helps. |
having the same issue trying to variable-ize my Bearer token in a downloadURL function, I assume this is still a WIP? |
In my first attempt at rewriting a ShortCut as a JellyCut (this ShortCut for ChatGPT API use), I've encountered a bug with JellyCuts validation of JSON arguments, which is rejecting valid JSON strings that contain (in this case) number fields (unquoted), causing compilation to fail with
"Compilation Error on line 6: Unable to find valid JSON"
, but only when the JSON being evaluated is from an existing Dictionary variable.This validation is performed, for example, when using the
dictionary()
ordownloadURL()
functions, both of which take JSON variable or JSON string as arguments.Interestingly, it won't reject the valid JSON string if it's hardcoded, so the following JellyCut code compiles and the resulting shortcut works:
But, when the JSON being evaluated is a variable, the validation fails. So this code fails:
giving the error:
"Compilation Error on line 6: Unable to find valid JSON"
which is this line:Version/Device info. iPhone Mini 13, iOS 17.1.1, JellyCuts v1.4.1(5)
Also posted in Discord #issues-bugs
bad_json.jelly.txt
good_json.jelly.txt
The text was updated successfully, but these errors were encountered: