X-Received: by 2002:a05:620a:65d:: with SMTP id a29mr7272800qka.285.1567749951435; Thu, 05 Sep 2019 23:05:51 -0700 (PDT) X-Received: by 2002:a37:e58:: with SMTP id 85mr7058071qko.403.1567749951221; Thu, 05 Sep 2019 23:05:51 -0700 (PDT) Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!o24no4046128qtl.0!news-out.google.com!c11ni109qtp.0!nntp.google.com!o24no4046120qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.postscript Date: Thu, 5 Sep 2019 23:05:50 -0700 (PDT) In-Reply-To: <1567559086.bystand@zzo38computer.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=24.107.176.41; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz NNTP-Posting-Host: 24.107.176.41 References: <1567559086.bystand@zzo38computer.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0ae78b2f-89f4-4b6b-9c5e-75fd39ca7f69@googlegroups.com> Subject: Re: JSON reader/writer in PostScript From: luser droog Injection-Date: Fri, 06 Sep 2019 06:05:51 +0000 Content-Type: text/plain; charset="UTF-8" Lines: 10 Xref: csiph.com comp.lang.postscript:3441 On Tuesday, September 3, 2019 at 8:20:26 PM UTC-5, ne...@zzo38computer.org.invalid wrote: > I wrote a program in PostScript for reading/writing JSON data. You can use > the following functions: > /.JSON.namech 256 string def > .JSON.namech 43 1 put %+ > JSON.namech 45 1 put %- > .JSON.namech 46 1 put %. I'd be tempted to write '(+) 0 get' instead of '43'. A little less efficient perhaps, but this part is one-time setup code so not critical. But using a string makes the comments unnecessary.