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: Yu Hongbo
Subject: [Octave-bug-tracker] [bug #63199] [feature request] add a function to inverse eval() function
Date: Tue, 11 Oct 2022 08:53:09 -0400 (EDT)

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

I understand that the result of "jsonencode() then jsondecode()" may change in
cross-language situation. All users should accept it. For example, users won't
give up using database with Octave although Octave is different to SQL.

Users transform data with data structure, so the unique-data-guarantee is
actually important. My examples is about nested JSON objects and JSON arrays,
and the jsondecode() function of Octave will condense some data structure,
then users will use extra index to rebuild the expected data. That will be a
mess.

And JSON text which are generated with the jsonencode() function of Octave
still have this kind of problem, here is my example in Octave version:
>> jsondecode(jsonencode({struct, struct}))
ans =

  2x1 struct array containing the fields:


>> jsondecode(jsonencode({{struct}, struct}))
ans =
{
  [1,1] =

    scalar structure containing the fields:


  [2,1] =

    scalar structure containing the fields:


}

>> jsondecode(jsonencode({{struct}, {struct}}))
ans =

  2x1 struct array containing the fields:

And did you mean that "every problem about every JSON text which are not
generated with the jsonencode() function of Octave won't be considered as
bug"?



    _______________________________________________________

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]