title: fstring in JSON, ValueError: Invalid format specifier, Python
body: <p>I have the following code:</p>
  <pre><code>import json
  
  domain=&quot;abc.com&quot;
  
  rawlog = json.loads(
              f'{&quot;domain&quot;: ${domain}}')
              
  print(rawlog[&quot;domain&quot;])
  </code></pre>
  <p>Which gives me:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;&lt;string&gt;&quot;, line 6, in &lt;module&gt;
  ValueError: Invalid format specifier
  &gt; 
  </code></pre>
  <p>The question is, what is the cause and if I can have fstring in Json? I'm using the newest Python: <code>python3 --version</code> shows <code>Python 3.10.4</code>.</p>
  <p>I also tried:</p>
  <pre><code>import json
  
  domain=&quot;abc.com&quot;
  
  rawlog = json.loads('{&quot;domain&quot;: f'{domain}'}')
              
  print(rawlog[&quot;domain&quot;])
  </code></pre>
  <p>but it gives:</p>
  <pre><code>File &quot;&lt;string&gt;&quot;, line 5
      rawlog = json.loads('{&quot;domain&quot;: f'domain'}')
                                        ^
  SyntaxError: invalid syntax
  </code></pre>