Re: [WebDNA] webDNA and JSON
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 106646
interpreted = N
texte = >> I noticed that the webDNA tags themselves are creating>> whitespace when returning back data.>=20> If this is a problem, why not just move your WebDNA tags to=20> get rid of the white space?Hi Aaron,=20I think Ken is right. I mean - I have done lots of webdna over the =years, and some coding with webdna and javascript talking to each =other.. not alot.. but just enough to comment..=20..and anyway i am guessing that what you will have to focus on is to =take total control of every character you output with webdna. In PHP =you have to (get to) specify just when/where you start and stop output.. =but with webdna everything but the tags themselves is output - as it =appears in your source doc. =20As a result of this situation, old-school webdna code used a ton of =comments to trim whitespace,=20...like [!]=20[/!] so.You can also use [function]s which only [return] what you say to =return...You can also do your manipulation/processing as always, but store any =developing output into concatenating [text] vars.. and then finally when =you are ready to actually output, then just drop in the [text] var. =This method allows to you do [grep], etc. to strip out unwanted chars, =or even add in wanted chars. Like you can replace all actual carriage =return/line feed chars with
, and replace all instances of ="someCRLFflag" with a real CR/LF char, when/where needed, for one =example.Play with it. Examine the evolving string of characters at various =steps to see what you are actually doing to the output as you generate =it.. step by step.- Govinda--------------Old WebDNA talklist archives:http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk
Associated Messages, from the most recent to the oldest:
>> I noticed that the webDNA tags themselves are creating>> whitespace when returning back data.>=20> If this is a problem, why not just move your WebDNA tags to=20> get rid of the white space?Hi Aaron,=20I think Ken is right. I mean - I have done lots of webdna over the =years, and some coding with webdna and javascript talking to each =other.. not alot.. but just enough to comment..=20..and anyway i am guessing that what you will have to focus on is to =take total control of every character you output with webdna. In PHP =you have to (get to) specify just when/where you start and stop output.. =but with webdna everything but the tags themselves is output - as it =appears in your source doc. =20As a result of this situation, old-school webdna code used a ton of =comments to trim whitespace,=20...like [!]=20[/!] so.You can also use [function]s which only [return] what you say to =return...You can also do your manipulation/processing as always, but store any =developing output into concatenating [text] vars.. and then finally when =you are ready to actually output, then just drop in the [text] var. =This method allows to you do [grep], etc. to strip out unwanted chars, =or even add in wanted chars. Like you can replace all actual carriage =return/line feed chars with , and replace all instances of ="someCRLFflag" with a real CR/LF char, when/where needed, for one =example.Play with it. Examine the evolving string of characters at various =steps to see what you are actually doing to the output as you generate =it.. step by step.- Govinda--------------Old WebDNA talklist archives:http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk
Govinda
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:
Opinion: [input] should be called [output] ... (1997)
webcat/webmerchant docs (1997)
WC2b15 File Corruption (1997)
Cannot calculate prices (1997)
NT based White paper (2003)
unique ascending numbers (2003)
popups, netscape vs explorer (1997)
Security hole in WebCat? (1999)
Web Delivery Page concept (1997)
using webdna to determine pixel parameters (2000)
Sku numbers (1997)
F3 crashing server (1997)
2.0Beta Command Ref (can't find this instruction) (1997)
FlushDatabase Suggestion (1998)
WebCat cannot handle compatible search parameters? (1997)
RE: Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997)
Deleting with contexts (2001)
Renaming TextA (1998)
WebDNA5 & Tiger (2006)
Webstar 1.3.1 PPC (1997)