user29519: The following question is about a 3rd party Arduino programming enviroment mBlock and creating extensions for it. I hope that there are some of you out there, who are fammiliar with it.
I was recently making an extensions for mBlock that can be used to write code for Arduino, when I came over this obstacle. I tried to write a function inside the "work":"" statement.
It looked like this:
"work":"Serial.print("Hello world");"
The extensions could not be imported, due to the quotation marks around the Hello world string. I tried removing the quotation marks, the extension was sucessfully added, but the program did not work, beacause quotation marks are needed inside C++ code to define a string.
Is there a way to add them in the extensions, without screwing up the code?

user4143: If that is a JSON format you could try using single quotes instead of double quotes: 
"work":'Serial.print("Hello world");'

Alternatively you could escape the internal quotes:
"work":"Serial.print(\"Hello world\");"


29519: <p>The following question is about a 3rd party Arduino programming enviroment mBlock and creating extensions for it. I hope that there are some of you out there, who are fammiliar with it.</p>

<p>I was recently making an extensions for mBlock that can be used to write code for Arduino, when I came over this obstacle. I tried to write a function inside the "work":"" statement.</p>

<p>It looked like this:</p>

<p>"work":"Serial.print("Hello world");"</p>

<p>The extensions could not be imported, due to the quotation marks around the Hello world string. I tried removing the quotation marks, the extension was sucessfully added, but the program did not work, beacause quotation marks are needed inside C++ code to define a string.</p>

<p>Is there a way to add them in the extensions, without screwing up the code?</p>
 4143: <p>If that is a JSON format you could try using single quotes instead of double quotes: </p>

<pre><code>"work":'Serial.print("Hello world");'
</code></pre>

<p>Alternatively you could escape the internal quotes:</p>

<pre><code>"work":"Serial.print(\"Hello world\");"
</code></pre>
