Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syntax Error "Expecting property name"
#1
Hi All, 
I've had a syntax error for a while now and I've checked everything but I cannot get past it:
"Expecting property name enclosed in double quotes: line 14 column 1 (char 507)".
JSON validator says the code's ok, claude.ai has no idea what it is. I've also checked my responses and stimuli and they are fine which makes sense because they have been saved. I'm trying to preview a particular part of my study so I'm presuming the issue is in my trial template because line 14 of the procedure is commented out. Trial template code is provided below with line number (including '.') to the left for reference:

1. {
2.    "Opening": {
3.        "type": "basic",
4.        "stimuli": [
5.           [
6.                "Image",
7.                "Welcome"
8.            ]
9.        ]
10.    },
11.    "Einverständniserklärung": {
12.        "type": "basic",
13.        "stimuli": [
14.            "Einverständniserklärung"
15.        ]
16.    },    // comma here as there is more code after this section


There were different stimuli in line 14 before I placed the code in a JSON validator and still, however, the error is line 14. 
Thanks in advance for any help.
Reply
#2
Hi MKMurphy,

That is very strange, thank you for bringing this up! Could you please share your study with [email protected]? Someone from our team will take a look as soon as we can.

Best,
Noah Nelson
VP of Product @ FindingFive
Reply
#3
Hello again MKMurphy -- are you still experiencing issues?

Unfortunately I can't seem to replicate the problem, so without seeing your study itself and experiencing the issue, there is little I can do to help. If you add [email protected] as a collaborator to your study I will be able to make a copy and take a look!

Cheers,
Noah Nelson
VP of Product @ FindingFive
Reply
#4
(07-17-2025, 01:29 PM)noah.nelson Wrote: Hello again MKMurphy -- are you still experiencing issues?

Unfortunately I can't seem to replicate the problem, so without seeing your study itself and experiencing the issue, there is little I can do to help. If you add [email protected] as a collaborator to your study I will be able to make a copy and take a look!

Cheers,


Hi Noah, 
Thanks for reaching out. I've just added [email protected] as a collaborator to the study there. 
Cheers, 
Mary-Kate
Reply
#5
Hi Mary-Kate,

Thanks for adding us as a collaborator. I was able to take a look, and have identified the issue! Due to commented-out chunks of code, there is an extra comma at the end of your last (un-commented) block ("Flanker_PBlock"). This is line number 23 in the code of your Procedure.

The error message was misleading, as it reports the line number and character position of the error based on the *processed code*, which is different from the line numbers you see because the processed code does not include any comments. We will look into how we might be able to address this in the future, as it is obviously not the most helpful!

Once you fix that, you'll find another error related to the use of nested lists (i.e., [[<list1>], [<list2>]]) in the definition of your trial_templates property for the Flanker_PBlock. The trial_templates property does NOT support nested lists, so that will have to be changed.

It looks like you are trying to create 4 sets of "yoked" trials, with a fixation, blank screen, target trial, and final blank screen. To make this work, you will need to combine the trial templates "Flanker_P_ConJ", "Flanker_P_ConF", "Flanker_P_IncJ", and "Flanker_P_IncF" into a single trial template. See the "response_pairing" property (https://hub.findingfive.com/study-gramma...se_pairing) to learn how to do this in a way that will allow you to map the correct responses onto each stimulus within that combined trial template.

Once you've done that, you can simplify the trial_templates property to be a simple list of 4 trial templates, and make use of the "alternate_random" ordering property (https://hub.findingfive.com/study-gramma...tabbed_2_6) to create the desired effect. Note that this property requires that all templates be the same length, so you will need to make sure that your "Flanker_Fixation" and "Blank_Screen" templates repeat their stimuli 16 times to match the length of the combined trial template.

Best of luck with this, and thank you for reporting this! We are always keen to improve our platform and the experience for researchers.
If you have any further questions, please let us know!

Cheers,
Noah Nelson
VP of Product @ FindingFive
Reply


Forum Jump:


Users browsing this thread: