Main Content



Save next buffer of JSON data for JSONConsumer


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


[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 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 object.

Buffer of raw data in a 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.



To learn about attributes of methods, see Method Attributes.

Version History

Introduced in R2018a