octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63199] [feature request] add a function to in


From: anonymous
Subject: [Octave-bug-tracker] [bug #63199] [feature request] add a function to inverse eval() function
Date: Tue, 11 Oct 2022 13:04:49 -0400 (EDT)

Follow-up Comment #11, bug #63199 (project octave):

Hi there!

In Octave the option "-text" of the "save" and "load" [1] functions can be
used to read/write the data as text.


a = {{struct}, {struct}};

save ('tmp', '-text', 'a');

b =  struct2cell(load('tmp','-text')){1};


If '-' is used as filename the data is written to a string instead of a file.


str = save ('-', 'a');


I believe that this method doesn't have the limitations of
jsonencode/jsondecode.

[1] https://docs.octave.org/v7.2.0/Simple-File-I_002fO.html


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63199>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]