[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternati
From: |
anonymous |
Subject: |
[Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json |
Date: |
Wed, 1 Dec 2021 18:26:15 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0 |
Follow-up Comment #45, patch #9980 (project octave):
I recognize what you and Markus are saying about the potential of misleading
message. And I won't argue that point. Nevertheless, I'm hesitant to simply
pass emit "regexprep" error as is. While you and Markus and I would recognize
the proper course of action, I'm thinking of the unskilled end user. For
him/her, seeing a error from "regexprep" could be confusing, if: 1) they don't
know what/why "regexprep" is, 2) doesn't recognize that "regexprep" is choking
on the input JSON string (as opposed to some other string, like the regex
pattern string).
Regardless, where you suggesting to leave "fromJSON" alone for now?
Or alternative, I could implement a screen for this very specific, likely
error, e.g.:
try
str = regexprep(str, '^[\s,]*','');
catch err
if( regexpi(err.message, "invalid(.*)UTF-8") );
error("Invalid UTF-8 encoding of JSON string");
else
error(err);
end
end_try_catch
Unfortunately, I'm unable (unskilled) to get Oct 7 built. Thus, I'm still
unable to replicate and test this against offending JSON strings.
K
_______________________________________________________
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,
anonymous <=
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, Philip Nienhuis, 2021/12/03
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, Philip Nienhuis, 2021/12/13
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2021/12/14
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2021/12/16
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2021/12/16
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2021/12/18
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2021/12/18
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, Philip Nienhuis, 2021/12/18
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2021/12/21
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, Philip Nienhuis, 2021/12/21