<?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 Re: JSON - omitted values are incorrectly retained in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/JSON-omitted-values-are-incorrectly-retained/m-p/677915#M204555</link>
    <description>&lt;P&gt;You might have a contact Tech Support and see if this is a defect.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Aug 2020 22:33:18 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-08-19T22:33:18Z</dc:date>
    <item>
      <title>JSON - omitted values are incorrectly retained</title>
      <link>https://communities.sas.com/t5/SAS-Programming/JSON-omitted-values-are-incorrectly-retained/m-p/676346#M203921</link>
      <description>&lt;P&gt;Here is some JSON. I omitted "number" in several entries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[
      {
       "type": "Full",
       "info" : [ 
          { "name" : "Eric" , "age" : 21, "phone" : [
             { "type" : "cell" },
             { "type" : "home", "number" : "542" }
             ]
          },
          { "name" : "John",  "age" : 22, "phone" : [
             { "type" : "cell", "number" : "456" },
             { "type" : "home"},
             { "type" : "home"}
             ]
          }
        ]
      },
      {
       "type": "Part",
       "info" : [ 
          { "name" : "Bjorn" , "age" : 27, "phone" : [
             { "type" : "cell",   "number" : "721" },
             { "type" : "burner"}
             ]
          }
        ]
    
      }
    ]&lt;/PRE&gt;&lt;P&gt;Here is a map. I am reading "number" 3 times:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;As character&lt;/LI&gt;&lt;LI&gt;As numeric with an informat&lt;/LI&gt;&lt;LI&gt;As numeric without an informat&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
      "DATASETS": [
        {
          "DSNAME": "all",    
          "TABLEPATH": "/root/info/phone",
          "VARIABLES": [
	    {
              "NAME": "Type",
              "TYPE": "CHARACTER",
              "PATH": "/root/info/phone/type"
            },
            {
              "NAME": "number1",
              "TYPE": "CHARACTER",
              "PATH": "/root/info/phone/number"
            },
		{
              "NAME": "number2",
              "TYPE": "NUMERIC",
              "PATH": "/root/info/phone/number",
	      "INFORMAT": ["BEST", 3, 0]
            },
            {
              "NAME": "number3",
              "TYPE": "NUMERIC",
              "PATH": "/root/info/phone/number"
            }
          ]
        }
      ]
    }&lt;/PRE&gt;&lt;P&gt;Here are the results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename jsondata "example.json";
filename example "example.map";
libname example JSON fileref=jsondata map=example;
 
data work.test;
    set example.all;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 391px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48175i304596753D0759A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;When&amp;nbsp;using&amp;nbsp;an&amp;nbsp;informat,&amp;nbsp;the&amp;nbsp;results&amp;nbsp;seem&amp;nbsp;to&amp;nbsp;be&amp;nbsp;getting&amp;nbsp;retained instead of appearing as missing.&amp;nbsp;How do I fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 23:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/JSON-omitted-values-are-incorrectly-retained/m-p/676346#M203921</guid>
      <dc:creator>John2020</dc:creator>
      <dc:date>2020-08-12T23:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: JSON - omitted values are incorrectly retained</title>
      <link>https://communities.sas.com/t5/SAS-Programming/JSON-omitted-values-are-incorrectly-retained/m-p/677915#M204555</link>
      <description>&lt;P&gt;You might have a contact Tech Support and see if this is a defect.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 22:33:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/JSON-omitted-values-are-incorrectly-retained/m-p/677915#M204555</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-08-19T22:33:18Z</dc:date>
    </item>
  </channel>
</rss>

