This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

putData

Class: matlab.net.http.io.JSONConsumer
Package: matlab.net.http.io

Save next buffer of JSON data for JSONConsumer

Syntax

[len,stop] = putData(consumer,data)

Description

[len,stop] = putData(consumer,data) passes data to the superclass to convert the uint8 buffer to a string, and then uses jsondecode to decode it and insert it into Response.Body.Data.

This method might not store the decoded JSON data until the entire message has been read.

This method is an overridden method of StringConsumer.putData. You can override this method to examine or alter the uint8 data before conversion, or the JSON data after decoding.

Input Arguments

expand all

Content consumer, specified as a matlab.net.http.io.JSONConsumer object.

Buffer of raw data in a matlab.net.http.ResponseMessage object, specified as a nonempty uint8 vector, uint8.empty, or []. For more information about these values, see the data input argument for the ContentConsumer.putData method.

Output Arguments

expand all

Length of data processed, returned as double or empty double. For more information, see the size argument in ContentConsumer.putData.

Indicate whether to receive further data from this message, returned as true or false. For more information, see the stop argument in ContentConsumer.putData.

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Introduced in R2018a