JSON double-quotes

Hello,

I have a problem with json formating.

When json DAT is in “indented” format, it shows double quotes

in “None” format, double quote are transformed in simple quote and node-red dont accept it (json rules are double quotes)

Windows 10, TD 2025.32280

This is technically not a bug, and is more so a byproduct of using the jsonpath python module. None means no formatting is done to the jsonpath parsed output, which essentially means it is python-formatted. To format it as JSON and to use it with subsequent JSON DATs, you will need to use Indented. I will improve the documentation for this.

Is there a reason you can’t just use Indented for your case?

Yes, there is a reason, because I want to send the json extract (from a big json file with json DAT) to node-red who need a plain json text with no indentations and space but with double-quote.

Python dict are made with simple quotes but the json rule needs double quotes.

I made a Python script changing simple to double before to send as UDP or OSC but it is not the best solution.

Understood – in that case I think we need another formatting option that replaces the single-quotes with double-quotes. I’ll leave None as-is since it currently doesn’t have any char-replace overhead that the other formatting options do, which is still beneficial in some cases.

Also, I’m not sure what method you’re using to convert quotes, but using json.dumps could be a good solution in the meantime. You can call it on your desired output object (eg. jsonDAT.result or jsonDAT.results) and it will handle the conversion for you without the need to worry about incorrect conversions of quotes.

Eg. S=json.dumps(jsonDAT.result) where S is what you’d then send to node-red.

Hello,

I was using S=jsonDAT.replace(‘\’’, ‘“‘)

I’ve added a new Double Quotes menu entry to the Output Format parameter that will convert single quotes to double quotes, without any indenting. This addition will be in the next official build we release: 2025.32600+.