Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: JSON Special Characters?

$
0
0
Re: JSON Special Characters?
Web Connection 5.0
Re: JSON Special Characters?
Nov. 12, 2012
01:30 am
3N5038TUXShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:Todd Landrum
This should work.

I tried this:

CLEARDO wwJsonSerializerTEXTTO lcText NOSHOW {\rtf1\ansi\deff0\deflang1033{\fonttbl{\f0\froman\fprq2 Arial;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\i\f0\fs20 Aid\i0 blah blah blah \ul blah\ul (blah blah). \par \cf0\fs18 \par }ENDTEXT ? lcText ? ? loJson = CREATEOBJECT("wwJsonSerializer") lcJson = loJson.Serialize(lcText) ? lcJson ? ? lcDeSerialized = loJson.Deserialize(lcJson) ? lcDeserialized ? lcText == lcDeserialized

and it two-way serializes/deserializes properly with the result string equaling the original value.

+++ Rick ---


I have a memo field with rich text that I'm doing a JSON serialize with. When I deserialize that, the field is just a .t.. Other fields are working fine, other memo fields work fine, it's just the rich text data. Does JSON have some special characters that might would mess things up? The data looks something like this:

{\rtf1\ansi\deff0\deflang1033{\fonttbl{\f0\froman\fprq2 Arial;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\cf1\i\f0\fs20 Aid\i0 blah blah blah \ul blah\ul (blah blah).
\par \cf0\fs18
\par }



Rick Strahl
West Wind Technologies


from Maui, Hawaii

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles