Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #31956
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | $Bill <news@todbe.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Simply displaying JSON data for users: what is your preferred method? |
| Date | Sun, 25 Dec 2016 15:40:58 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 17 |
| Message-ID | <o3plbj$68l$1@dont-email.me> (permalink) |
| References | <o3m6up$3e3$1@dont-email.me> <1rz8pc765tt5d$.1mqm96f9bs5jy$.dlg@40tude.net> <JSON-20161226000736@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sun, 25 Dec 2016 23:39:32 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="c48cf2594a12691bfa77bb671357863b"; logging-data="6421"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/dEKvfWXvgwQviEKCLCn6cfOdwCHuvgMw=" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
| In-Reply-To | <JSON-20161226000736@ram.dialup.fu-berlin.de> |
| Cancel-Lock | sha1:nd7gnXXAqKadEAiVh5Dv5AlmxBs= |
| Xref | csiph.com comp.lang.javascript:31956 |
Show key headers only | View raw
On 12-25-16 15:19, Stefan Ram wrote: > JJ <jj4public@vfemail.net> writes: >> Just guessing, but I think a regular expression based converter would be >> more efficient and faster than object based. i.e. JSON string to HTML string >> then slap it all together using innerHTML, instead of JSON objects to HTML >> element objects. > > I believe that it should be quit difficult to properly parse > JSON source with regular expression. I wrote a JSON parser in Perl using RE's and parsing out tokens which I then used to create a Perl hash duplicating the JSON object - not that difficult code-wise (maybe 500-600 lines including blanks), but haven't really checked the efficiency of it. I also wrote an ICS to JSON converter and a JSON pretty printer (maybe 100 lines ea) rather than writing another parser and then I run it through the JSON parser. I use them regularly to scrape web pages.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Simply displaying JSON data for users: what is your preferred method? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-12-24 16:15 +0000
Re: Simply displaying JSON data for users: what is your preferred method? JJ <jj4public@vfemail.net> - 2016-12-25 18:01 +0700
Re: Simply displaying JSON data for users: what is your preferred method? $Bill <news@todbe.com> - 2016-12-25 15:40 -0800
Re: Simply displaying JSON data for users: what is your preferred method? David Mark <dmark.cinsoft@gmail.com> - 2016-12-25 16:21 -0800
Re: Simply displaying JSON data for users: what is your preferred method? $Bill <news@todbe.com> - 2016-12-25 19:36 -0800
Re: Simply displaying JSON data for users: what is your preferred method? David Mark <dmark.cinsoft@gmail.com> - 2016-12-26 04:50 -0800
Re: Simply displaying JSON data for users: what is your preferred method? $Bill <news@todbe.com> - 2016-12-26 15:08 -0800
Re: Simply displaying JSON data for users: what is your preferred method? David Mark <dmark.cinsoft@gmail.com> - 2016-12-28 19:26 -0800
Re: Simply displaying JSON data for users: what is your preferred method? JJ <jj4public@vfemail.net> - 2016-12-26 23:19 +0700
Re: Simply displaying JSON data for users: what is your preferred method? JJ <jj4public@vfemail.net> - 2016-12-26 23:30 +0700
Re: Simply displaying JSON data for users: what is your preferred method? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-12-26 16:27 +0000
Re: Simply displaying JSON data for users: what is your preferred method? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-12-26 12:36 -0800
csiph-web