bugGNU Octave - Bugs: bug #58217, webread returns char array instead...


bug #58217: webread returns char array instead of struct

Submitter:  Dora Kocsis <kdlinda>
Submitted:  Mon 20 Apr 2020 05:24:54 PM UTC
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Mon 27 Apr 2020 08:41:18 PM UTC, comment #2: 

Also, returning a struct from a URL that responds with JSON depends on the jsondecode function, see bug #53100. There are a handful of jsondecode implementations that have been worked on, but none integrated into Octave's core library yet.

Mike Miller <mtmiller>
Group Member
Tue 21 Apr 2020 03:14:31 AM UTC, comment #1: 

Also see bug #57408 which is the same issue in a different guise.  Instead of returning an image, webread returns a char array.  In fact, at the moment, webread always returns a string because it is built on top of urlread.

Rik <rik5>
Group administrator
Mon 20 Apr 2020 05:24:54 PM UTC, original submission:  

Webread seems to ignore the content type specified by weboptions and returns a char row vector instead of a struct for the below query.

options = weboptions('ContentType', 'json');
url = 'https://api.db.nomics.world/v22/series?observations=1&series_ids=AMECO/ZUTN/EA19.';
response_ = webread(url);
class (response_)

Dora Kocsis <kdlinda>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by kdlinda (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-04-27 mtmiller Dependencies- Depends on bugs #53100
    2020-04-21 rik5 Item GroupIncorrect Result Matlab Compatibility
        StatusNone Confirmed
        Dependencies- Depends on bugs #57408

    Back to the top

    Powered by Savane 3.13-ee12.
    Corresponding source code