title: How to access a Google Datastore LocalStructuredProperty from a VB .Net forms app? VB sees it as a blob
body: <p>First a little background; The GAE app was developed by a third party and provides an interface for some embedded hardware to save data to the cloud over a mobile network. The data is POSTed from the device as a JSON object over HTTP. The app on GAE is written in python, and I have full access to the source code (even though I don't fully understand it!)</p>
  <p>The data field &quot;points&quot; is a fixed length array of items with a location, datestamp and two numbers.</p>
  <p>The data model for a single point is thus (obfuscated for security):</p>
  <pre><code>class MeasurementPoint(EndpointsModel):
      Val1 = ndb.FloatProperty()
      Val2 = ndb.FloatProperty()
      timestamp = ndb.DateTimeProperty(auto_now_add=True)
      loc = ndb.GeoPtProperty() 
  </code></pre>
  <p>and for the encapuslating class (again obfuscated):</p>
  <pre><code>class CompletedReading(EndpointsModel):  
      
      _message_fields_schema = ('id', 'inspection_id', 'timestamp', 
                                'points',
                                'Val1_average', 'Val2_average', 'Val1_min', 
                                'location_id',
                                'organisation_id', )
  
      
      timestamp = ndb.DateTimeProperty(auto_now_add=True)
      points = ndb.LocalStructuredProperty(Measurement, repeated=True, compressed=True) 
      
      Val1_average = ndb.FloatProperty()
      Val2_average = ndb.FloatProperty()
      Val1_min = ndb.FloatProperty()
          
      ... hopefully you get the idea.
  </code></pre>
  <p>The posted JSON is something like:</p>
  <pre><code>{
    &quot;points&quot;: [
      {
        &quot;Val1&quot;: 999,
        &quot;Val2&quot;: 319160.3,
        &quot;timestamp&quot;: &quot;2020-03-03T15:56:01.000000&quot;,
        &quot;location&quot;: {
          &quot;lat&quot;: 52.75024,
          &quot;lon&quot;: -1.919412
        }
      },
      {
        &quot;Val1&quot;: 999,
        &quot;Val2&quot;: 319160.3,
        &quot;timestamp&quot;: &quot;2020-03-03T15:56:02.000000&quot;,
        &quot;location&quot;: {
          &quot;lat&quot;: 52.75024,
          &quot;lon&quot;: -1.919412
        }
      },
      ..... n sets of &quot;points&quot; ( always a fixed size array )
    ],
    &quot;organisation_id&quot;: &quot;5634161670881280&quot;,
    &quot;location_id&quot;: &quot;5638358357245952&quot;,
    &quot;timestamp&quot;: &quot;2020-03-03T15:55:58.000000&quot;
  }
  </code></pre>
  <p>So... I now have this data stored in the database and I am writing a .net app (in VB, but it could easily be C#) and I am using the <strong>Google.Cloud.Datastore.V1</strong> API to access it. So far this is all working and I can list the <strong>CompletedReading</strong> entity using the following simple code:</p>
  <pre><code>Imports Google.Cloud.Datastore.V1
  Imports Google.Protobuf
  
  Public Class Form1
      Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
          Dim ProjectId As String = &quot;xxxxxxxxxx&quot; ' Obfuscated for security
          Dim db As DatastoreDb
          Dim kind As String = &quot;CopmletedReading&quot; 
          Dim q As Query
          Dim Entry As Entity
  
          ' In order for this to work you have to set the environment variable 
          ' GOOGLE_APPLICATION_CREDENTIALS= &lt;Path to zzzzzzzzzzzz.json&gt; (Obfuscated for security)
          
  
          Environment.SetEnvironmentVariable(&quot;GOOGLE_APPLICATION_CREDENTIALS&quot;, &quot;zzzzzzzzzzzz.json&quot;)
  
          db = DatastoreDb.Create(ProjectId)
  
          q = New Query(kind)
  
          Label1.Text = &quot;&quot;
  
          For Each Entry In db.RunQueryLazily(q)
              Label1.Text = Label1.Text &amp; vbCrLf &amp; vbCrLf &amp; vbCrLf &amp; vbCrLf &amp;
                   &quot;ToString:&quot; &amp; vbCrLf &amp; Entry.ToString &amp; vbCrLf &amp; vbCrLf &amp;
                   &quot;Key:&quot; &amp; vbCrLf &amp; Entry.Key.ToString &amp; vbCrLf &amp; vbCrLf &amp;
                   &quot;Properties:&quot; &amp; vbCrLf &amp; Entry.Properties().ToString &amp; vbCrLf &amp; vbCrLf &amp;
                   &quot;name:&quot; &amp; vbCrLf &amp; Entry.Item(&quot;points&quot;).ToString
          Next
      End Sub
  End Class
  </code></pre>
  <p>results in the following output for each entity ....</p>
  <pre><code>
  ToString:
  { &quot;key&quot;: { &quot;partitionId&quot;: { &quot;projectId&quot;: &quot;xxxxxxxxxx&quot; }, &quot;path&quot;: [ { &quot;kind&quot;: &quot;CompletedReading&quot;, &quot;id&quot;: &quot;6320665133056000&quot; } ] }, &quot;properties&quot;: { &quot;Val1_average&quot;: { &quot;doubleValue&quot;: 422 }, &quot;Val2_average&quot;: { &quot;doubleValue&quot;: 278 }, &quot;organisation_ref&quot;: { &quot;keyValue&quot;: { &quot;partitionId&quot;: { &quot;projectId&quot;: &quot;xxxxxxxxxx&quot; }, &quot;path&quot;: [ { &quot;kind&quot;: &quot;Organisation&quot;, &quot;id&quot;: &quot;5629499534213120&quot; } ] } }, &quot;location_id&quot;: { &quot;keyValue&quot;: { &quot;partitionId&quot;: { &quot;projectId&quot;: &quot;xxxxxxxxxx&quot; }, &quot;path&quot;: [ { &quot;kind&quot;: location&quot;, &quot;id&quot;: &quot;4922041111150592&quot; } ] } }, &quot;points&quot;: { &quot;arrayValue&quot;: { &quot;values&quot;: [ { &quot;meaning&quot;: 22, &quot;blobValue&quot;: &quot;eJwrkpXiy8gvyqzKzytJzInPKa1QYNDiVGQAgQ8VDkUqHJxSHDn5yYklmfl5QCkRbcPVjjNu713g5WB5d9oJ1vQHEgd0iqQ42KU4SzJzU4sLEnMLQCZwLNu+ZcuOzxeYiqSleMpSi0oyk9GNX1DoAAD8CChx&quot;, &quot;excludeFromIndexes&quot;: true }, { &quot;meaning&quot;: 22, &quot;blobValue&quot;: &quot;eJwrkpXiy8gvyqzKzytJzInPKa1QYNDiVGQAgYIqhyIVDk4pjpz85MSSzPw8oJSItuFqxxm39y7wcrB8HMzQk/5A4oBOkRQHuxRnSWZuanFBYm4ByASOXdu3bNnx+QJTkbQUT1lqUUlmMrrxDwocAK8uJ8g=&quot;, &quot;excludeFromIndexes&quot;: true }, { &quot;meaning&quot;: 22, &quot;blobValue&quot;: &quot;eJwrkpXiy8gvyqzKzytJzInPKa1QYNDiVGQAgQPVDkUqHJxSHDn5yYklmfl5QCkRbcM3Bmp/9y7wcrB8KWAhlPFA4oBOkRQHuxRnSWZuanFBYm4ByASOXdu3bNnx+QJTkbQUT1lqUUlmMrrxCwodAKVhJzw=&quot;, &quot;excludeFromIndexes&quot;: true } ] } }, &quot;timestamp&quot;: { &quot;timestampValue&quot;: &quot;2016-12-14T10:08:47Z&quot; }, &quot;Val1_min&quot;: { &quot;doubleValue&quot;: 399 } } }
  
  Key:
  { &quot;partitionId&quot;: { &quot;projectId&quot;: &quot;xxxxxxxxxx&quot; }, &quot;path&quot;: [ { &quot;kind&quot;: &quot;CompletedReading&quot;, &quot;id&quot;: &quot;6320665133056000&quot; } ] }
  
  Properties:
  { &quot;Val1_average&quot;: { &quot;doubleValue&quot;: 422 }, &quot;Val2_average&quot;: { &quot;doubleValue&quot;: 278 }, &quot;organisation_ref&quot;: { &quot;keyValue&quot;: { &quot;partitionId&quot;: { &quot;projectId&quot;: &quot;xxxxxxxxxx&quot; }, &quot;path&quot;: [ { &quot;kind&quot;: &quot;Organisation&quot;, &quot;id&quot;: &quot;5629499534213120&quot; } ] } }, &quot;location_id&quot;: { &quot;keyValue&quot;: { &quot;partitionId&quot;: { &quot;projectId&quot;: &quot;xxxxxxxxxx&quot; }, &quot;path&quot;: [ { &quot;kind&quot;: &quot;location&quot;, &quot;id&quot;: &quot;4922041111150592&quot; } ] } }, &quot;points&quot;: { &quot;arrayValue&quot;: { &quot;values&quot;: [ { &quot;meaning&quot;: 22, &quot;blobValue&quot;: &quot;eJwrkpXiy8gvyqzKzytJzInPKa1QYNDiVGQAgQ8VDkUqHJxSHDn5yYklmfl5QCkRbcPVjjNu713g5WB5d9oJ1vQHEgd0iqQ42KU4SzJzU4sLEnMLQCZwLNu+ZcuOzxeYiqSleMpSi0oyk9GNX1DoAAD8CChx&quot;, &quot;excludeFromIndexes&quot;: true }, { &quot;meaning&quot;: 22, &quot;blobValue&quot;: &quot;eJwrkpXiy8gvyqzKzytJzInPKa1QYNDiVGQAgYIqhyIVDk4pjpz85MSSzPw8oJSItuFqxxm39y7wcrB8HMzQk/5A4oBOkRQHuxRnSWZuanFBYm4ByASOXdu3bNnx+QJTkbQUT1lqUUlmMrrxDwocAK8uJ8g=&quot;, &quot;excludeFromIndexes&quot;: true }, { &quot;meaning&quot;: 22, &quot;blobValue&quot;: &quot;eJwrkpXiy8gvyqzKzytJzInPKa1QYNDiVGQAgQPVDkUqHJxSHDn5yYklmfl5QCkRbcM3Bmp/9y7wcrB8KWAhlPFA4oBOkRQHuxRnSWZuanFBYm4ByASOXdu3bNnx+QJTkbQUT1lqUUlmMrrxCwodAKVhJzw=&quot;, &quot;excludeFromIndexes&quot;: true } ] } }, &quot;timestamp&quot;: { &quot;timestampValue&quot;: &quot;2016-12-14T10:08:47Z&quot; }, &quot;Val1_min&quot;: { &quot;doubleValue&quot;: 399 } }
  
  name:
  { &quot;arrayValue&quot;: { &quot;values&quot;: [ { &quot;meaning&quot;: 22, &quot;blobValue&quot;: &quot;eJwrkpXiy8gvyqzKzytJzInPKa1QYNDiVGQAgQ8VDkUqHJxSHDn5yYklmfl5QCkRbcPVjjNu713g5WB5d9oJ1vQHEgd0iqQ42KU4SzJzU4sLEnMLQCZwLNu+ZcuOzxeYiqSleMpSi0oyk9GNX1DoAAD8CChx&quot;, &quot;excludeFromIndexes&quot;: true }, { &quot;meaning&quot;: 22, &quot;blobValue&quot;: &quot;eJwrkpXiy8gvyqzKzytJzInPKa1QYNDiVGQAgYIqhyIVDk4pjpz85MSSzPw8oJSItuFqxxm39y7wcrB8HMzQk/5A4oBOkRQHuxRnSWZuanFBYm4ByASOXdu3bNnx+QJTkbQUT1lqUUlmMrrxDwocAK8uJ8g=&quot;, &quot;excludeFromIndexes&quot;: true }, { &quot;meaning&quot;: 22, &quot;blobValue&quot;: &quot;eJwrkpXiy8gvyqzKzytJzInPKa1QYNDiVGQAgQPVDkUqHJxSHDn5yYklmfl5QCkRbcM3Bmp/9y7wcrB8KWAhlPFA4oBOkRQHuxRnSWZuanFBYm4ByASOXdu3bNnx+QJTkbQUT1lqUUlmMrrxCwodAKVhJzw=&quot;, &quot;excludeFromIndexes&quot;: true } ] } }
  
  </code></pre>
  <p>This is the point at which I'm stuck. I'm not familiar with GAE/Datastore/Python or the Google API .... I have tried unsuccesfully to try to deserialise the blob into a VB class. I can't find any references in the API to a <strong>LocalStructuredProperty</strong> so I can't deal with it directly.</p>
  <p>My &quot;last ditch&quot; thought was to attempt to write some python on the web server to read the datastore back into a suitable object then fire the data back at my VB app as JSON, but I'd really prefer to be able to access the object in the datastore from VB and to get my array of points back.</p>
  <p>Can anyone suggest where I go from here?? Thanks for looking.</p>