Re: tdom encoding

Liste des GroupesRevenir à cl tcl 
Sujet : Re: tdom encoding
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tcl
Date : 17. Dec 2024, 05:20:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjqu76$1i1a9$1@dont-email.me>
References : 1
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
saito <saitology9@gmail.com> wrote:
I am trying to see why tdom is failing on this json snippet.
 
package req tdom
set x {{"name":"Jeremi^G"}}
dom parse -json $x
 
==> error "JSON syntax error" at position 15
"{"name":"Jeremi^G <--Error-- "}"

Assuming the ^G that did come through properly represnts the
character, then greg is right, it is an ASCII bell character, and per
the JSON spec [1] raw control characters are not allowed to be part of
a JSON string.

Which is why Tdom is telling you 'error' at the ^G output.

Are you on linux?  If yes the hexdump, objdump, or xxd (xxd is easiest
to use) commands will show you exactly what raw byte values exist in
the file.


[1] https://www.json.org/json-en.html

Date Sujet#  Auteur
17 Dec 24 * tdom encoding10saito
17 Dec 24 +* Re: tdom encoding4greg
17 Dec 24 i+* Re: tdom encoding2saito
17 Dec 24 ii`- Re: tdom encoding1Rich
19 Dec 24 i`- Re: tdom encoding1Alan Grunwald
17 Dec 24 +- Re: tdom encoding1Rich
18 Dec 24 `* Re: tdom encoding4Rolf Ade
18 Dec 24  `* Re: tdom encoding3saito
18 Dec 24   `* Re: tdom encoding2Harald Oehlmann
18 Dec 24    `- Re: tdom encoding1saito

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal