<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Parsing a JSON with special characters. in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Parsing-a-JSON-with-special-characters/m-p/241114#M768</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hello, I have the following response that I need to parse, it's basically a JSON object where I need to retrieve the field 'x-real-ip,' but Dynatrace marks the character '-' as invalid.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;        "headers": {
          "accept": "application/json, text/plain, */*",
          "accept-encoding": "gzip, deflate, br, zstd",
          "accept-language": "es-CL,es;q=0.9,en;q=0.8,en-US;q=0.7",
          "content-length": "3840",
          "content-type": "application/json",
          "cookie": "_ga=GA1.1.807424739.1711029955; dtCookie=v_4_srv_3_sn_AD0CB92A9B023486D52C166472FF433A_perc_100000_ol_0_mul_1_app-xxxxxxxxxx; rxVisitor=xxxxxxxxxx; dtSa=-; rxvt=1711457578849|1711454729279; dtPC=3$255775100_625h1vRHSFFAMLCWIPMNKLPUMKNBDGTBACILCR-0e0; _ga_VRHGLJ0CC3=GS1.1.1711455778.7.1.1711455787.51.0.0",
          "host": "prod.salud.achs.cl",
          "origin": "xxxxxxxxxx",
          "referer": "xxxxxxxxxx",
          "sec-ch-ua": "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\"",
          "sec-ch-ua-mobile": "?0",
          "sec-ch-ua-platform": "\"xxxxxxxxxx\"",
          "sec-fetch-dest": "empty",
          "sec-fetch-mode": "cors",
          "sec-fetch-site": "same-origin",
          "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
          "x-access-token": "xxxxxxxxxx",
          "x-dynatrace-application": "v=2;appId=c70633ee2206b4f0;injectionRule=auto;cookieDomain=achs.cl;rid=-xxxxxxxxxx;rpid=xxxxxxxxxx;en=e27ehw6g",
          "x-forwarded-for": "10.246.36.39",
          "x-forwarded-host": "xxxxxxxxxx",
          "x-forwarded-port": "443",
          "x-forwarded-proto": "https",
          "x-forwarded-scheme": "https",
          "x-real-ip": "10.12.36.121",
          "x-request-id": "373e44e474c844e6df809215447ffb12",
          "x-scheme": "https"
        },&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my dql Code its:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| PARSE content, "JSON{JSON:message}:parsejson"
| fields timestamp, alias:fecha,
	parsejson[message][properties][data][body][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][body][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][body][servicioIdentificacion][xxxxxxx], alias:xxxxxxx, 
	parsejson[message][properties][data][body][documentosMatriz][0][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][body][documentosMatriz][0][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][body][documentosMatriz][0][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][headers][x-real-ip], alias:ip&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2024 09:20:48 GMT</pubDate>
    <dc:creator>Ellery</dc:creator>
    <dc:date>2024-03-27T09:20:48Z</dc:date>
    <item>
      <title>Parsing a JSON with special characters.</title>
      <link>https://community.dynatrace.com/t5/DQL/Parsing-a-JSON-with-special-characters/m-p/241114#M768</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, I have the following response that I need to parse, it's basically a JSON object where I need to retrieve the field 'x-real-ip,' but Dynatrace marks the character '-' as invalid.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;        "headers": {
          "accept": "application/json, text/plain, */*",
          "accept-encoding": "gzip, deflate, br, zstd",
          "accept-language": "es-CL,es;q=0.9,en;q=0.8,en-US;q=0.7",
          "content-length": "3840",
          "content-type": "application/json",
          "cookie": "_ga=GA1.1.807424739.1711029955; dtCookie=v_4_srv_3_sn_AD0CB92A9B023486D52C166472FF433A_perc_100000_ol_0_mul_1_app-xxxxxxxxxx; rxVisitor=xxxxxxxxxx; dtSa=-; rxvt=1711457578849|1711454729279; dtPC=3$255775100_625h1vRHSFFAMLCWIPMNKLPUMKNBDGTBACILCR-0e0; _ga_VRHGLJ0CC3=GS1.1.1711455778.7.1.1711455787.51.0.0",
          "host": "prod.salud.achs.cl",
          "origin": "xxxxxxxxxx",
          "referer": "xxxxxxxxxx",
          "sec-ch-ua": "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\"",
          "sec-ch-ua-mobile": "?0",
          "sec-ch-ua-platform": "\"xxxxxxxxxx\"",
          "sec-fetch-dest": "empty",
          "sec-fetch-mode": "cors",
          "sec-fetch-site": "same-origin",
          "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
          "x-access-token": "xxxxxxxxxx",
          "x-dynatrace-application": "v=2;appId=c70633ee2206b4f0;injectionRule=auto;cookieDomain=achs.cl;rid=-xxxxxxxxxx;rpid=xxxxxxxxxx;en=e27ehw6g",
          "x-forwarded-for": "10.246.36.39",
          "x-forwarded-host": "xxxxxxxxxx",
          "x-forwarded-port": "443",
          "x-forwarded-proto": "https",
          "x-forwarded-scheme": "https",
          "x-real-ip": "10.12.36.121",
          "x-request-id": "373e44e474c844e6df809215447ffb12",
          "x-scheme": "https"
        },&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my dql Code its:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| PARSE content, "JSON{JSON:message}:parsejson"
| fields timestamp, alias:fecha,
	parsejson[message][properties][data][body][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][body][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][body][servicioIdentificacion][xxxxxxx], alias:xxxxxxx, 
	parsejson[message][properties][data][body][documentosMatriz][0][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][body][documentosMatriz][0][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][body][documentosMatriz][0][xxxxxxx], alias:xxxxxxx,
	parsejson[message][properties][data][headers][x-real-ip], alias:ip&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 09:20:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Parsing-a-JSON-with-special-characters/m-p/241114#M768</guid>
      <dc:creator>Ellery</dc:creator>
      <dc:date>2024-03-27T09:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing a JSON with special characters.</title>
      <link>https://community.dynatrace.com/t5/DQL/Parsing-a-JSON-with-special-characters/m-p/241183#M769</link>
      <description>&lt;P&gt;Please use backticks: `x-real-ip`&lt;BR /&gt;&lt;BR /&gt;Kris&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 10:40:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Parsing-a-JSON-with-special-characters/m-p/241183#M769</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2024-03-27T10:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing a JSON with special characters.</title>
      <link>https://community.dynatrace.com/t5/DQL/Parsing-a-JSON-with-special-characters/m-p/241262#M783</link>
      <description>&lt;P&gt;thanks, works perfects !!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 19:27:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Parsing-a-JSON-with-special-characters/m-p/241262#M783</guid>
      <dc:creator>Ellery</dc:creator>
      <dc:date>2024-03-27T19:27:40Z</dc:date>
    </item>
  </channel>
</rss>

