AltME: Ann-Reply

Messages

Gregg
Thanks Chris! I think Bolek has an XML parser as well. We'll have to compare and, with luck, they can be result-format compatible.
Also, I'm going to use "untimely-end" in every program I can now. :^)
Also, really nice use of macros for compatibility.
Chris
Endo--it's a hybrid script, there's no PUT in Rebol 3/Ren-C so needed to approximate. Note that the macro clears out the assignment so it doesn't actually overwrite PUT in Red.
GreggÑI initially went with 'premature' which just didn't quite fit...
Gregg--I see it as a useful feature to quickly bridge the gap between languages initially. Optimization will likely have to happen separately.
it = macros...

Arnold
Very good work Chris!

Rebolek
Gregg, Chris, I do, its available on my Github. Its called XML, but actually it implements lot of HTML
Rebolek
^^^ some of HTML quirks, to be able to parse various websites. There is also %html-tools.red in same repo, that implements some nice functions to make it easy to import HTML data (like tables) to Red (or Rebol, if someone is willing to port it).

Gregg
Thanks Chris!

eFishAnt
Chris, you always do amazing, wonderful work!

Endo
Great work Chris!
Gregg
Thanks Chris!

Chris
I know JSON parsers are a saturated space, but I was curious once again about the Red conversion process and needed the surrogate pairs -> UTF string.
PeterWood
I don't really understand the surrogate pairs to UTF issue. Does AltJSON UTF-16 encode the JSON string?
Chris
Yes--it should possibly be optional, but is part of the RFC7159 spec.
It's--as I understand it--the only prescribed way to encode characters above the BMP as ascii.
Chris
Is also in the icky-sounding ECMA-404.
PeterWood
I haven't looked at the RFC7159 spec as I followed the link on JOSN.org to the ECMA standard. The ECMA standard doesn't seem to mention text encoding but does mention that JSON strings are Unicode code points and refers to the \u notation.
JSONLint validates  {"str": "\u1F606"}
Is the issue that you want to load the JSON directly in JavaScript?

Last message posted 2 weeks ago.