How to retrieve BLOB data from the Azure blob in the JBS format?

I have stored the json data format in azure blob storage,
now I want to retrieve those data from azure blob in the form of json.

I tried to follow

//get all blob from contrainer
var storageAccount = CloudStorageAccount.Parse("connection string");
var blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference("tablesblob");

foreach (IListBlobItem item in container.ListBlobs(null, false))
{< br /> if (item.GetType() == typeof(CloudBlockBlob))
{
CloudBlockBlob blob = (CloudBlockBlob)item;
var ms = new MemoryStream();
//blob.DownloadToStream(ms); how to get blob data in the form of JSON?
}
}

how to get azure blob data in the form of JSON?

You can try to use the CloudBlockBlob.DownloadText method to download the blob content as text, and then use Json.Net’s JsonConvert to serialize the string to the client object For example, something like the following:

var customerData = blob.DownloadText();
var customer = JsonConvert.DeserializeObject(customerData) ;

I have stored the json data format in azure blob storage,
now I want to retrieve those data from azure blob in the form of json.

< /p>

I tried to follow

//get all blob from contrainer
var storageAccount = CloudStorageAccount.Parse("connection string");
var blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference("tablesblob");

foreach (IListBlobItem item in container.ListBlobs(null, false))< br /> {
if (item.GetType() == typeof(CloudBlockBlob))
{
CloudBlockBlob blob = (CloudBlockBlob)item;
var ms = ne w MemoryStream();
//blob.DownloadToStream(ms); how to get blob data in the form of JSON?
}
}

how to get azure blob data in the form of JSON?

You can try to use the CloudBlockBlob.DownloadText method to set the blob Download the content as text, and then use Json.Net’s JsonConvert to serialize the string into the customer object. For example, something like the following:

var customerData = blob. DownloadText();
var customer = JsonConvert.DeserializeObject(customerData);

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2738 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.