-
Notifications
You must be signed in to change notification settings - Fork 17
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
Problem extracting nested jsonData? #9
Comments
This is happening because the created and modified date values are not encoded in the sample json you provided. But, when I copy and paste the example calculation into the sample file that ships with this project (text expression field), then click "Run this test", the Actual Result field does have the created and modified values encoded. I've got two guesses about what your issue is:
|
My bad, I accidentally pasted the code from one of my own attempts to fix it. In the failing code, the timestamps are not
|
Ok, after running the calculation result through jsonlint.org and browsing briefly on StackOverflow, looks like dates are a bit of a hassle in JSON (http://stackoverflow.com/questions/4511705/how-to-parse-json-to-receive-a-date-object-in-javascript). What's the safest way to pass this in FileMaker? Should I |
Ok, after some further testing, It looks like the value Unfortunately, my app is getting data from an API, and does not know in advance whether a given field is a date or not. I'll have to go back to the drawing board to figure out a real-world solution we can apply. I'll leave this open in case you want to add some kind of date-safing (or new |
It turns out this is a bug, but this issue was posted on the wrong project I created an issue for this at: dansmith65/FileMaker-JSON-Functions#34 |
I'm passing a script a parameter that looks like this (shown if you use
Get ( ScriptParameter )
):When I try to run
jsonGet ( Get ( ScriptParameter ) ; "jsonData" )
, the result is a question mark ("?").The contents of
$json.error
are:Here's the calculation used to created the script parameter:
The text was updated successfully, but these errors were encountered: