ParseJSON problem

I am using code from TIm D’s Airtable example.
I am getting an illegal cast error trying to parse the data listed below.

In the page received event.

                  Dim http_result As Text
		  Dim results As Dictionary
		  Dim records() as Auto
		  Dim record as Dictionary
		  Dim fields As Dictionary
		 if HTTPStatus = 200 then
				    // Convert the content returned from the API from a MemoryBlock to Text.
				    http_result = xojo.core.TextEncoding.UTF8.ConvertDataToText ( Content )
				    // Parse the JSON result into a Dictionary
				    results = Xojo.Data.ParseJSON ( http_result )
				    // Create an array of records based on the results.
				    records() = results.Value ( "records" )
				    // Add a blank section to the table object.
				   ' Table1.AddSection("")
				    // Loop over the records and add the to the table...
				    for i As integer = 0 to records.Ubound
						      // Get the next record.
						      record = records ( i )
						      // Get the record's field values.
						      fields = record.Value ( "fields" )
		end if


{“records”:[{“id”:“rec4xQa72GuUeUFh5”,“fields”:{“Name”:“Gustav Klimt”},“createdTime”:“2015-02-09T23:24:33.000Z”}],“offset”:“itrrypFOlKp5YnLEm/rec4xQa72GuUeUFh5”}[/code]


[quote=301978:@Tim Kearns]

{"records":[{"id":"rec4xQa72GuUeUFh5","fields":{"Name":"Gustav Klimt"},"createdTime":"2015-02-09T23:24:33.000Z"}],"offset":"itrrypFOlKp5YnLEm/rec4xQa72GuUeUFh5"}[/quote]

Is this your JSON data?

Yes, this a simplified version with just 1 record and a few fields, but gives the same error as when all fields and records are retrieved

{"records":[{"id":"rec4xQa72GuUeUFh5","fields":{"Name":"Gustav Klimt"},"createdTime":"2015-02-09T23:24:33.000Z"}],"offset":"itrrypFOlKp5YnLEm/rec4xQa72GuUeUFh5"}

Actuallly the error is not about your JSON data, but related to your code.
In this code, you’re trying to cast xojo.Core.Dictionary to Dictionary .

Dim results As Dictionary
results = Xojo.Data.ParseJSON ( http_result )

change to this code probably will fix the error.

Dim results As xojo.Core.Dictionary
Dim records() as Auto
Dim record as xojo.Core.Dictionary
Dim fields As xojo.Core.Dictionary