Re: [GSoC] JSON Test suite status
Kai Torben Ohlhus <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.maintainers |
|---|---|
| Message-ID | <[email protected]> |
On 6/22/20 5:19 AM, Abdallah Elshamy wrote: > [...] > Also in MATLAB, they don't support encoding for complex numbers. Is it > better to follow this approach or should we support encoding for it? > Maybe encoding it to a JSON object with two keys: "real" and "imaginary". > [...] I cherish your enthusiasm. For the start it is more than sufficient to support what Matlab supports and to do this job perfectly. If users demand the complex encoding feature that much, it can be added at any time later. > Lastly in decoding json objects to structs MATLAB uses makeValidName [4] > in converting the keys of the objects to a valid field in the struct (as > it doesn't allow the fields of a struct to start with a space or a > number ... etc.) As this is valid in Octave, I don't think that this > will be necessary. What do you think? What do you mean by "this is valid in Octave"? Such calls are neither allowed in Octave too my_struct.2bad_fieldname = 4 Btw. Octave implements that function too [2]. Kai [1] https://www.mathworks.com/help/matlab/ref/matlab.lang.makevalidname.html [2] https://www.octave.org/doc/v5.2.0/XREFmatlab_005flang_005fmakeValidName.html