Avro Schema. How to set type to "record" and "null" at once
<p>I need to mix "record" type with null type in Schema. </p>

<pre><code>"name":"specShape",
         "type":{
            "type":"record",
            "name":"noSpecShape",
            "fields":[
               {
                  "name":"bpSsc",
                  "type":"null",
                  "default":null,
                  "doc":"SampleValue: null"
               },...
</code></pre>

<p>For example, for some datas specShape may be null.</p>

<p>So if I set type to </p>

<pre><code>"name":"specShape",
         "type":{
            **"type":["record", "null"],**
            "name":"noSpecShape",
            "fields":[
               {
                  "name":"bpSsc",
                  "type":"null",
                  "default":null,
                  "doc":"SampleValue: null"
               },...
</code></pre>

<p>it says </p>

<pre><code>No type: {"type":["record","null"]...
</code></pre>

<p>But if I set whoole type to</p>

<pre><code>"name":"specShape",
         **"type":[{
            "type":"record",
            "name":"noSpecShape",
            "fields":[
               {
                  "name":"bpSsc",
                  "type":"null",
                  "default":null,
                  "doc":"SampleValue: null"
               }, "null"]**,...
</code></pre>

<p>it says</p>

<pre><code>Not in union [{"type":"record"
</code></pre>

<p>How to union these two types?</p>