[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternati
From: |
Philip Nienhuis |
Subject: |
[Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json |
Date: |
Mon, 13 Dec 2021 15:35:42 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #47, patch #9980 (project octave):
I tried a few json files from Seamonkey's profile dir. I didn't see file
encoding errros this time but saw a few differences between fromJSON and
Octave's core jsondecode functions:
>> fid = fopen ('blocklist-gfx.json')
fid = 3
>> json = fread (fid, Inf, "*char")';
>> fclose (fid)
ans = 0
>> a = fromJSON (json);
warning: fromJSON.m: invalid frag: "
{
"vendor": "0x10de""
warning: fromJSON.m: invalid frag: ": "g200""
warning: fromJSON.m: invalid frag: ": []"
warning: fromJSON.m: invalid frag: ": true"
warning: fromJSON.m: invalid frag: ": {
"who": "All Firefox users.""
warning: fromJSON.m: invalid frag: ": "Security problems.""
warning: fromJSON.m: invalid frag: ":
"https://bugzilla.mozilla.org/show_bug.cgi?id=80955
0""
warning: fromJSON.m: invalid frag: ": "Mac OS X WebGL anti-aliasing""
warning: fromJSON.m: invalid frag: ": "2012-11-12T10:35:32Z"
}"
warning: fromJSON.m: invalid frag: ": "ae36a32e-5f4f-2f98-804f-22b0de5e7bfa""
warning: fromJSON.m: invalid frag: ": "BLOCKED_DEVICE""
warning: fromJSON.m: invalid frag: ": "Darwin 11""
warning: fromJSON.m: invalid frag: ": 1480349135384"
warning: fromJSON.m: invalid frag: ": "WEBGL_MSAA""
warning: fromJSON.m: invalid frag: ": 1480349134676"
warning: fromJSON.m: invalid frag: ": "synced"
}"
while core Octave jsondecode emits no warnings:
>> a = jsondecode (json);
>>
No idea if this is relevant at all. As I wrote before, I'm unfamiliar with
JSON.
(file 'blockinglist-gfx.json' attached)
They're just warnings; I note different style outputs but we knew that
fromJSON isn't Matlab-compatible and we agreed that it could be a Good Thing
some comments ago didn't we.
Indeed I wrote that as package maintainer and non-JSON-user I have no need to
improve fromJSON, I think that's entirely your pick as author.
So if you want to amend the regexprep warning code, here's your chance.
I'd like to make a new io release before New Years Eve, in fact this fromJSON
thing is actually what the release is waiting for. I also wrote that fromJSON
fixes could also wait for io-2.6.5, but seeing that current io-2.6.3 is over a
year old now another year may be a bit long ...
(file #52501)
_______________________________________________________
Additional Item Attachment:
File name: blocklist-gfx.json Size:27 KB
<https://file.savannah.gnu.org/file/blocklist-gfx.json?file_id=52501>
_______________________________________________________
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, 2021/12/01
- [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 <=
- [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
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, Philip Nienhuis, 2021/12/21
- [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json, anonymous, 2021/12/22