[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternati
From: |
Markus Mützel |
Subject: |
[Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json |
Date: |
Sat, 7 Nov 2020 03:56:38 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36 Edg/86.0.622.63 |
Follow-up Comment #38, patch #9980 (project octave):
Sorry, I didn't read the changeset earlier. But this snippet might give
misleading error messages:
+ try
+ str = regexprep(str,'^[\s,]*','');
+ catch
+ error("Invalid UTF-8 encoding of JSON string");
+ end_try_catch
I am not certain if the only reason for which regexprep can possibly fail is
invalid UTF-8. If it fails for a different reason, the error message that is
shown might lead in the wrong direction.
It might be better to remove the try-catch-block and let regexprep display an
error message directly.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?9980>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, Philip Nienhuis, 2020/11/01
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2020/11/01
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, Philip Nienhuis, 2020/11/01
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2020/11/02
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json,
Markus Mützel <=
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2020/11/07
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, Markus Mützel, 2020/11/07
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, Philip Nienhuis, 2020/11/07