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


bug #58217: webread returns char array instead of struct

Submitted by:  Dora Kocsis <kdlinda>
Submitted on:  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

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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>
Project Administrator
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>
Project 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)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project 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.7