Re: [WebDNA] Escaping content for JSON
This WebDNA talk-list message is from 2013
It keeps the original formatting.
numero = 110283
interpreted = N
texte = --047d7b67809ebdd95304d8d27433Content-Type: text/plain; charset=UTF-8Donovan,Thanks - that looks pretty good - I'll have a detailed look later on.Would be great if [convertchars] could deal with double-byte encodings ;-)Take care- Tom==============================================Digital Revolutionaries1st Floor, Castleriver House14-15 Parliament StreetTemple Bar,Dublin 2Ireland----------------------------------------------[t]: + 353 1 4403907[e]:
[w]: ==============================================On 26 March 2013 05:54, Donovan Brooke wrote:> Tom Duke wrote:>>> Hi all,>>>> Trying to work out the best method of preparing content for use with>> JSON. My db charset is UTF-8 and it seems I need to use a>> [convertwords] and a [convertchars] to escape all of the required chars.>>>> Double quotes are not captured if I use just [convertchars]. Wondering>> if anyone else has come up with a cleaner solution.>>>> Thanks>> - Tom>>>>>> Conversion tables:>>>> [table name=jsonconvert&fields=from,**to]>> "\">> \\\>> /\/>> [/table]>>>> [table name=jsonconvert2&fields=from,**to]>> %0B\n>> [/table]>>>>>> JSON output:>>>> {>> "label": "Title:",>> "name": "[convertchars table=jsonconvert2][**convertwords>> table=jsonconvert][theTitle][/**convertwords][/convertchars]">> }>>>>>> Tom,> Here is what I came up with tonight:>> http://www.euca.us/admin/**tests/json_test.html>> Donovan>>>>>> --> Donovan Brooke> WebDNA Software Corporation> http://www.webdna.us> **[Square Bracket Utopia]**> ------------------------------**---------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/**talk@webdna.us> Bug Reporting: support@webdna.us>--047d7b67809ebdd95304d8d27433Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableDonovan,
Thanks - that looks pret=ty good - I'll have a detailed look later on. =C2=A0 Would be great if =[convertchars] could deal with double-byte encodings ;-)
Take care
- Tom
--047d7b67809ebdd95304d8d27433--
Associated Messages, from the most recent to the oldest:
--047d7b67809ebdd95304d8d27433Content-Type: text/plain; charset=UTF-8Donovan,Thanks - that looks pretty good - I'll have a detailed look later on.Would be great if [convertchars] could deal with double-byte encodings ;-)Take care- Tom==============================================Digital Revolutionaries1st Floor, Castleriver House14-15 Parliament StreetTemple Bar,Dublin 2Ireland----------------------------------------------[t]: + 353 1 4403907[e]: [w]: ==============================================On 26 March 2013 05:54, Donovan Brooke wrote:> Tom Duke wrote:>>> Hi all,>>>> Trying to work out the best method of preparing content for use with>> JSON. My db charset is UTF-8 and it seems I need to use a>> [convertwords] and a [convertchars] to escape all of the required chars.>>>> Double quotes are not captured if I use just [convertchars]. Wondering>> if anyone else has come up with a cleaner solution.>>>> Thanks>> - Tom>>>>>> Conversion tables:>>>> [table name=jsonconvert&fields=from,**to]>> "\">> \\\>> /\/>> [/table]>>>> [table name=jsonconvert2&fields=from,**to]>> %0B\n>> [/table]>>>>>> JSON output:>>>> {>> "label": "Title:",>> "name": "[convertchars table=jsonconvert2][**convertwords>> table=jsonconvert][theTitle][/**convertwords][/convertchars]">> }>>>>>> Tom,> Here is what I came up with tonight:>> http://www.euca.us/admin/**tests/json_test.html>> Donovan>>>>>> --> Donovan Brooke> WebDNA Software Corporation> http://www.webdna.us> **[Square Bracket Utopia]**> ------------------------------**---------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/**talk@webdna.us> Bug Reporting: support@webdna.us>--047d7b67809ebdd95304d8d27433Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableDonovan,
Thanks - that looks pret=ty good - I'll have a detailed look later on. =C2=A0 Would be great if =
[convertchars] could deal with double-byte encodings ;-)
Take care
- Tom
--047d7b67809ebdd95304d8d27433--
Tom Duke
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
expire headers in mac305b11 (1999)
FEW QUESTIONS (1997)
purchase.log file (1997)
Setting up shop (1997)
Question about replacing words (1998)
WebCat2 as a chat server? (1997)
PCS Customer submissions ? (1997)
Search returns all, not 20 (1997)
Fun with Dates (syntax) (2002)
Open source store builder (Merchant Maker?) (2003)
possible, WebCat2.0 and checkboxes-restated (1997)
Writing [raw] to a file (2000)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
Shopping Cart Deletion (2000)
Bug Report, maybe (1997)
Multiple adding (1997)
What is WebDNA (1997)
Re:Emailer and encryption (1997)
WebDNA 5 & iTools 7 (2003)
RE: [sendmail]- bcc? (1998)