Custom json error ("Expecting...double quotes...") SOLVED


I’m currently using Daisy Seed and pd2dsy to build a sensor-based instrument. In order to map sensor data to synth parameters, I made a custom json file and ran the following line in the terminal.

python -c customseed.json project.pd

I have both customseed.json and project.pd in the same pd2dsy folder.

	"name": "customseed",
	"som": "seed",
	"components": {
		"knob": {
			"component": "AnalogControl",
			"pin": 15
		"ribbon1": {
			"component": "AnalogControl",
			"pin": 16
		"ribbon2": {
			"component": "AnalogControl",
			"pin": 17
		"fsr1": {
			"component": "AnalogControl",
			"pin": 18
		"fsr2": {
			"component": "AnalogControl",
			"pin": 19

But I get the error…

json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

It’s clearly in double quotes, so I’m confused as to what I’m doing wrong.

I would greatly appreciate any insight!

FYI, I’m using TextEdit. I change the .rtf extension to .json. Maybe this is bad?


I can’t comment on the content of your json file, but I’m sure it’s expected to be a plain text file. The colors, and the fact that it had an rtf extension tell me it’s not.

If you’re using TextEdit on a Mac, there should be a Preferences setting to create plain text files by default.

RTF files contain hidden characters for various fancy features, these will confuse parsers.

1 Like

Changing the setting to plain text worked!!
Thank you so much for the help! I really appreciated it.