Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Research is to see what everybody else has seen, and think what nobody else has thought.


devel / comp.lang.mumps / How to write JSON to multi-level global?

SubjectAuthor
* How to write JSON to multi-level global?Сергей Каменев
+* Re: How to write JSON to multi-level global?Rod Dorman
|`* Re: How to write JSON to multi-level global?Сергей Каменев
| `* Re: How to write JSON to multi-level global?K.S. Bhaskar
|  `* Re: How to write JSON to multi-level global?Jens
|   `- Re: How to write JSON to multi-level global?Сергей Каменев
+- Re: How to write JSON to multi-level global?rtweed
`* Re: How to write JSON to multi-level global?rtweed
 `* Re: How to write JSON to multi-level global?Sam Habiel
  `* Re: How to write JSON to multi-level global?Valeriu Gontia
   `* Re: How to write JSON to multi-level global?Sam Habiel
    `* Re: How to write JSON to multi-level global?Valeriu Gontia
     `* Re: How to write JSON to multi-level global?Valeriu Gontia
      `* Re: How to write JSON to multi-level global?rtweed
       `* Re: How to write JSON to multi-level global?Valeriu Gontia
        `- Re: How to write JSON to multi-level global?rtweed

1
How to write JSON to multi-level global?

<9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=226&group=comp.lang.mumps#226

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a05:622a:4cf:: with SMTP id q15mr32430017qtx.265.1635791927907;
Mon, 01 Nov 2021 11:38:47 -0700 (PDT)
X-Received: by 2002:ac8:7d4f:: with SMTP id h15mr10732173qtb.336.1635791927624;
Mon, 01 Nov 2021 11:38:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 1 Nov 2021 11:38:47 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=46.39.45.9; posting-account=eaShnQoAAABLy95ZTEb7H0YHkVXcD4qO
NNTP-Posting-Host: 46.39.45.9
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
Subject: How to write JSON to multi-level global?
From: sukamenev@gmail.com (Сергей Каменев)
Injection-Date: Mon, 01 Nov 2021 18:38:47 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 4
 by: Сергей Кам - Mon, 1 Nov 2021 18:38 UTC

Hi!

Is there a ready-made M function that stores a json string as a multi-level global?

Sergey

Re: How to write JSON to multi-level global?

<slpcgt$19$1@reader1.panix.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=227&group=comp.lang.mumps#227

  copy link   Newsgroups: comp.lang.mumps
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix2.panix.com!not-for-mail
From: rodd@panix.com (Rod Dorman)
Newsgroups: comp.lang.mumps
Subject: Re: How to write JSON to multi-level global?
Date: Mon, 1 Nov 2021 18:43:41 -0000 (UTC)
Organization: Public Access Networks Corp.
Message-ID: <slpcgt$19$1@reader1.panix.com>
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
Injection-Date: Mon, 1 Nov 2021 18:43:41 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix2.panix.com:166.84.1.2";
logging-data="41"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
 by: Rod Dorman - Mon, 1 Nov 2021 18:43 UTC

In article <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>,
�е� гей � аменев <sukamenev@gmail.com> wrote:
>Is there a ready-made M function that stores a json string as a
>multi-level global?

There's no Standard M function that would do that.

What implementation are you running on?

--
-- Rod --
rodd(at)polylogics(dot)com

Re: How to write JSON to multi-level global?

<1b5e139b-5cd2-408a-abbb-079a120f6b66n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=228&group=comp.lang.mumps#228

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:5e4e:: with SMTP id i14mr31974043qtx.129.1635794736380;
Mon, 01 Nov 2021 12:25:36 -0700 (PDT)
X-Received: by 2002:a05:620a:40c7:: with SMTP id g7mr7875710qko.330.1635794736096;
Mon, 01 Nov 2021 12:25:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 1 Nov 2021 12:25:35 -0700 (PDT)
In-Reply-To: <slpcgt$19$1@reader1.panix.com>
Injection-Info: google-groups.googlegroups.com; posting-host=193.107.193.43; posting-account=eaShnQoAAABLy95ZTEb7H0YHkVXcD4qO
NNTP-Posting-Host: 193.107.193.43
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com> <slpcgt$19$1@reader1.panix.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1b5e139b-5cd2-408a-abbb-079a120f6b66n@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: sukamenev@gmail.com (Сергей Каменев)
Injection-Date: Mon, 01 Nov 2021 19:25:36 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Сергей Кам - Mon, 1 Nov 2021 19:25 UTC

I use YottaDB.
Any M function that works well will suit me

> >Is there a ready-made M function that stores a json string as a
> >multi-level global?
> There's no Standard M function that would do that.
>
> What implementation are you running on?

Re: How to write JSON to multi-level global?

<63a9cafb-a880-4cb6-93ff-f09bbe0a61ebn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=229&group=comp.lang.mumps#229

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:7d8e:: with SMTP id c14mr23013154qtd.209.1635819968852;
Mon, 01 Nov 2021 19:26:08 -0700 (PDT)
X-Received: by 2002:ac8:5704:: with SMTP id 4mr15922853qtw.346.1635819968633;
Mon, 01 Nov 2021 19:26:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Mon, 1 Nov 2021 19:26:08 -0700 (PDT)
In-Reply-To: <1b5e139b-5cd2-408a-abbb-079a120f6b66n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=108.52.84.50; posting-account=zTPg1AoAAABx_LtAQ3dW6FBnU1dwmSvl
NNTP-Posting-Host: 108.52.84.50
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<slpcgt$19$1@reader1.panix.com> <1b5e139b-5cd2-408a-abbb-079a120f6b66n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <63a9cafb-a880-4cb6-93ff-f09bbe0a61ebn@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: ksbhaskar@gmail.com (K.S. Bhaskar)
Injection-Date: Tue, 02 Nov 2021 02:26:08 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 14
 by: K.S. Bhaskar - Tue, 2 Nov 2021 02:26 UTC

On Monday, November 1, 2021 at 3:25:37 PM UTC-4, suka...@gmail.com wrote:
> I use YottaDB.
> Any M function that works well will suit me
> > >Is there a ready-made M function that stores a json string as a
> > >multi-level global?
> > There's no Standard M function that would do that.
> >
> > What implementation are you running on?

There are any number of M functions to store and retrive JSON in M global variables. Ask your favorite search engine (I used DuckDuckGo) and if you don't find links to several routines, ask again here.

Regards
– Bhaskar

Re: How to write JSON to multi-level global?

<1ce03ec1-8246-4a08-97f3-44cdc83cc650n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=230&group=comp.lang.mumps#230

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a05:620a:d96:: with SMTP id q22mr28004703qkl.219.1635843327519;
Tue, 02 Nov 2021 01:55:27 -0700 (PDT)
X-Received: by 2002:a37:358:: with SMTP id 85mr2446372qkd.467.1635843327350;
Tue, 02 Nov 2021 01:55:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Tue, 2 Nov 2021 01:55:27 -0700 (PDT)
In-Reply-To: <63a9cafb-a880-4cb6-93ff-f09bbe0a61ebn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:d5:e730:6000:a544:e160:a3b2:1fbd;
posting-account=Fb5loAoAAAAWGHFa1kwW5TIlX7XcPFIS
NNTP-Posting-Host: 2003:d5:e730:6000:a544:e160:a3b2:1fbd
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<slpcgt$19$1@reader1.panix.com> <1b5e139b-5cd2-408a-abbb-079a120f6b66n@googlegroups.com>
<63a9cafb-a880-4cb6-93ff-f09bbe0a61ebn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1ce03ec1-8246-4a08-97f3-44cdc83cc650n@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: jewu34@web.de (Jens)
Injection-Date: Tue, 02 Nov 2021 08:55:27 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
 by: Jens - Tue, 2 Nov 2021 08:55 UTC

K.S. Bhaskar schrieb am Dienstag, 2. November 2021 um 03:26:09 UTC+1:
> On Monday, November 1, 2021 at 3:25:37 PM UTC-4, suka...@gmail.com wrote:
> > I use YottaDB.
> > Any M function that works well will suit me

The function at

https://github.com/lparenteau/DataBallet/blob/master/r/json.m

worked good for me...

Jens

Re: How to write JSON to multi-level global?

<2c62b8df-8055-4c14-85c5-2538cc47db23n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=231&group=comp.lang.mumps#231

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a05:620a:2403:: with SMTP id d3mr3401895qkn.352.1635846647057;
Tue, 02 Nov 2021 02:50:47 -0700 (PDT)
X-Received: by 2002:ac8:5f91:: with SMTP id j17mr36388690qta.147.1635846646754;
Tue, 02 Nov 2021 02:50:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Tue, 2 Nov 2021 02:50:46 -0700 (PDT)
In-Reply-To: <1ce03ec1-8246-4a08-97f3-44cdc83cc650n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=193.107.193.43; posting-account=eaShnQoAAABLy95ZTEb7H0YHkVXcD4qO
NNTP-Posting-Host: 193.107.193.43
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<slpcgt$19$1@reader1.panix.com> <1b5e139b-5cd2-408a-abbb-079a120f6b66n@googlegroups.com>
<63a9cafb-a880-4cb6-93ff-f09bbe0a61ebn@googlegroups.com> <1ce03ec1-8246-4a08-97f3-44cdc83cc650n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2c62b8df-8055-4c14-85c5-2538cc47db23n@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: sukamenev@gmail.com (Сергей Каменев)
Injection-Date: Tue, 02 Nov 2021 09:50:47 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 18
 by: Сергей Кам - Tue, 2 Nov 2021 09:50 UTC

Thank you, Jens!

The code is pretty clear.

I found a thread with a few more options, but they are less clear.

https://groups.google.com/g/comp.lang.mumps/c/2-Figm7Uqbw

Sergey

> > > I use YottaDB.
> > > Any M function that works well will suit me
> The function at
>
> https://github.com/lparenteau/DataBallet/blob/master/r/json.m
>
> worked good for me...
>
> Jens

Re: How to write JSON to multi-level global?

<c174c5b5-02c2-4724-bcc3-f25fe2e6aaaan@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=232&group=comp.lang.mumps#232

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a1c:c90f:: with SMTP id f15mr15201649wmb.78.1635944376126;
Wed, 03 Nov 2021 05:59:36 -0700 (PDT)
X-Received: by 2002:ac8:58c2:: with SMTP id u2mr37136945qta.413.1635944375769;
Wed, 03 Nov 2021 05:59:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Wed, 3 Nov 2021 05:59:35 -0700 (PDT)
In-Reply-To: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:800:da00:9dc8:a93f:d5f3:1f24;
posting-account=7_GEEwoAAAA24F6PVSvhz0uWuZgymXyC
NNTP-Posting-Host: 2a00:23a8:800:da00:9dc8:a93f:d5f3:1f24
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c174c5b5-02c2-4724-bcc3-f25fe2e6aaaan@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: rob.tweed@gmail.com (rtweed)
Injection-Date: Wed, 03 Nov 2021 12:59:35 +0000
Content-Type: text/plain; charset="UTF-8"
 by: rtweed - Wed, 3 Nov 2021 12:59 UTC

See the mgweb_server repository at https://github.com/robtweed/mgweb-server

You can use the routines in this repo standalone. Specifically see:

https://github.com/robtweed/mgweb-server/blob/master/DEV-PATTERN.md#json-handling-made-easy

These routines for mapping arrays to/from JSON are tried and tested...and free/open source.

Re: How to write JSON to multi-level global?

<877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=233&group=comp.lang.mumps#233

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a7b:c257:: with SMTP id b23mr14984522wmj.67.1635944642461;
Wed, 03 Nov 2021 06:04:02 -0700 (PDT)
X-Received: by 2002:ac8:5b8c:: with SMTP id a12mr45320092qta.342.1635944642176;
Wed, 03 Nov 2021 06:04:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!border2.nntp.ams1.giganews.com!nntp.giganews.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Wed, 3 Nov 2021 06:04:02 -0700 (PDT)
In-Reply-To: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:800:da00:9dc8:a93f:d5f3:1f24;
posting-account=7_GEEwoAAAA24F6PVSvhz0uWuZgymXyC
NNTP-Posting-Host: 2a00:23a8:800:da00:9dc8:a93f:d5f3:1f24
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: rob.tweed@gmail.com (rtweed)
Injection-Date: Wed, 03 Nov 2021 13:04:02 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 7
 by: rtweed - Wed, 3 Nov 2021 13:04 UTC

BTW the fact that there is a one-to-one correspondence between JSON (and XML) and M Globals is the heart of this set of documents:

https://github.com/robtweed/global_storage

and is the basis of the Node.js abstraction of Global Storage into persistent JSON/JavaScript Objects known as QEWD-JSdb:

https://github.com/robtweed/qewd-jsdb

Re: How to write JSON to multi-level global?

<269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=234&group=comp.lang.mumps#234

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:6112:: with SMTP id a18mr55614801qtm.401.1636053595957;
Thu, 04 Nov 2021 12:19:55 -0700 (PDT)
X-Received: by 2002:a37:358:: with SMTP id 85mr17399850qkd.467.1636053595702;
Thu, 04 Nov 2021 12:19:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Thu, 4 Nov 2021 12:19:55 -0700 (PDT)
In-Reply-To: <877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=208.92.185.144; posting-account=1RT8nQoAAAAj9lvLkm8f9L-U6g6gYLit
NNTP-Posting-Host: 208.92.185.144
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com> <877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: sam.habiel@gmail.com (Sam Habiel)
Injection-Date: Thu, 04 Nov 2021 19:19:55 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: Sam Habiel - Thu, 4 Nov 2021 19:19 UTC

On Wednesday, November 3, 2021 at 7:04:03 AM UTC-6, rtweed wrote:
> BTW the fact that there is a one-to-one correspondence between JSON (and XML) and M Globals is the heart of this set of documents:
>
> https://github.com/robtweed/global_storage
>
> and is the basis of the Node.js abstraction of Global Storage into persistent JSON/JavaScript Objects known as QEWD-JSdb:
>
> https://github.com/robtweed/qewd-jsdb
You can try this too: https://github.com/shabiel/M-Web-Server/blob/master/doc/important-utilities.md#json

Re: How to write JSON to multi-level global?

<c621bd0f-6162-4be1-8818-5a15421f9473n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=238&group=comp.lang.mumps#238

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a05:620a:2589:: with SMTP id x9mr5687427qko.454.1636633217237;
Thu, 11 Nov 2021 04:20:17 -0800 (PST)
X-Received: by 2002:a05:620a:2444:: with SMTP id h4mr5704729qkn.398.1636633217075;
Thu, 11 Nov 2021 04:20:17 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Thu, 11 Nov 2021 04:20:16 -0800 (PST)
In-Reply-To: <269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.28.53.26; posting-account=6oXPhQoAAAA5df4ZzTru9drXwPkbOifd
NNTP-Posting-Host: 89.28.53.26
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com> <269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c621bd0f-6162-4be1-8818-5a15421f9473n@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: gontiaval@gmail.com (Valeriu Gontia)
Injection-Date: Thu, 11 Nov 2021 12:20:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 49
 by: Valeriu Gontia - Thu, 11 Nov 2021 12:20 UTC

четверг, 4 ноября 2021 г. в 21:19:56 UTC+2, Sam Habiel:
> On Wednesday, November 3, 2021 at 7:04:03 AM UTC-6, rtweed wrote:
> > BTW the fact that there is a one-to-one correspondence between JSON (and XML) and M Globals is the heart of this set of documents:
> >
> > https://github.com/robtweed/global_storage
> >
> > and is the basis of the Node.js abstraction of Global Storage into persistent JSON/JavaScript Objects known as QEWD-JSdb:
> >
> > https://github.com/robtweed/qewd-jsdb
> You can try this too: https://github.com/shabiel/M-Web-Server/blob/master/doc/important-utilities.md#json

Hello Sam !
Why, if numbers appear in a node, I get a different result ???

In the same example:
S X ("myObj", "booleanT") = "true"
S X ("myObj", "booleanF") = "false"
S X ("myObj", "numeric") = 3.1416
S X ("myObj", "nullValue") = "null"
S X ("myObj", "array", 1) = "one"
S X ("myObj", "array", 2) = "two"
S X ("myObj", "array", 3) = "three"
S X ("myObj", "subObject", "fieldA") = "hello"
S X ("myObj", "subObject", "fieldB") = "world"
JSON (1) = "{" myObj ": {" array ": [" one "," two "," three "]," booleanF ": false," booleanT ": true," nullValue ": null," numeric ":"
JSON (2) = "3.1416," subObject ": {" fieldA ":" hello "," fieldB ":" world "}}}"

In my case:
XX (501, "array", 1) = "one"
XX (501, "array", 2) = "two"
XX (501, "array", 3) = "three"
XX (501, "booleanF") = "false"
XX (501, "booleanT") = "true"
XX (501, "nullValue") = "null"
XX (501, "numeric") = 3.1416
XX (501, "subObject", "fieldA") = "hello"
XX (501, "subObject", "fieldB") = "world"
JSON (1) = "{[{" array ": [" one "," two "," three "]," booleanF ": false," booleanT ": true," nullValue ": null," numeric ": 3.1416 , "
JSON (2) = "" subObject ": {" fieldA ":" hello "," fieldB ":" world "}}]}"

It happens to me that the nodes of globals contain only numbers
(codes) ...

Re: How to write JSON to multi-level global?

<e4b12166-fc2f-47ba-9346-21f9e7ed928cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=239&group=comp.lang.mumps#239

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a37:a956:: with SMTP id s83mr6404282qke.422.1636642171430;
Thu, 11 Nov 2021 06:49:31 -0800 (PST)
X-Received: by 2002:a05:622a:118f:: with SMTP id m15mr8090873qtk.81.1636642171162;
Thu, 11 Nov 2021 06:49:31 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Thu, 11 Nov 2021 06:49:30 -0800 (PST)
In-Reply-To: <c621bd0f-6162-4be1-8818-5a15421f9473n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=208.92.185.144; posting-account=1RT8nQoAAAAj9lvLkm8f9L-U6g6gYLit
NNTP-Posting-Host: 208.92.185.144
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com> <269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>
<c621bd0f-6162-4be1-8818-5a15421f9473n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e4b12166-fc2f-47ba-9346-21f9e7ed928cn@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: sam.habiel@gmail.com (Sam Habiel)
Injection-Date: Thu, 11 Nov 2021 14:49:31 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 54
 by: Sam Habiel - Thu, 11 Nov 2021 14:49 UTC

On Thursday, November 11, 2021 at 5:20:17 AM UTC-7, gont...@gmail.com wrote:
> четверг, 4 ноября 2021 г. в 21:19:56 UTC+2, Sam Habiel:
> > On Wednesday, November 3, 2021 at 7:04:03 AM UTC-6, rtweed wrote:
> > > BTW the fact that there is a one-to-one correspondence between JSON (and XML) and M Globals is the heart of this set of documents:
> > >
> > > https://github.com/robtweed/global_storage
> > >
> > > and is the basis of the Node.js abstraction of Global Storage into persistent JSON/JavaScript Objects known as QEWD-JSdb:
> > >
> > > https://github.com/robtweed/qewd-jsdb
> > You can try this too: https://github.com/shabiel/M-Web-Server/blob/master/doc/important-utilities.md#json
> Hello Sam !
> Why, if numbers appear in a node, I get a different result ???
>
> In the same example:
> S X ("myObj", "booleanT") = "true"
> S X ("myObj", "booleanF") = "false"
> S X ("myObj", "numeric") = 3.1416
> S X ("myObj", "nullValue") = "null"
> S X ("myObj", "array", 1) = "one"
> S X ("myObj", "array", 2) = "two"
> S X ("myObj", "array", 3) = "three"
> S X ("myObj", "subObject", "fieldA") = "hello"
> S X ("myObj", "subObject", "fieldB") = "world"
> JSON (1) = "{" myObj ": {" array ": [" one "," two "," three "]," booleanF ": false," booleanT ": true," nullValue ": null," numeric ":"
> JSON (2) = "3.1416," subObject ": {" fieldA ":" hello "," fieldB ":" world "}}}"
>
> In my case:
> XX (501, "array", 1) = "one"
> XX (501, "array", 2) = "two"
> XX (501, "array", 3) = "three"
> XX (501, "booleanF") = "false"
> XX (501, "booleanT") = "true"
> XX (501, "nullValue") = "null"
> XX (501, "numeric") = 3.1416
> XX (501, "subObject", "fieldA") = "hello"
> XX (501, "subObject", "fieldB") = "world"
> JSON (1) = "{[{" array ": [" one "," two "," three "]," booleanF ": false," booleanT ": true," nullValue ": null," numeric ": 3.1416 , "
> JSON (2) = "" subObject ": {" fieldA ":" hello "," fieldB ":" world "}}]}"
>
> It happens to me that the nodes of globals contain only numbers
> (codes) ...
The encoder behaves differently if you start with a number (it assumes you want an array) vs not (it will assume that you want an object).

--Sam

Re: How to write JSON to multi-level global?

<069592d2-ba7d-4785-8073-d8db09ac00aen@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=240&group=comp.lang.mumps#240

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a37:a193:: with SMTP id k141mr7758065qke.88.1636654658568;
Thu, 11 Nov 2021 10:17:38 -0800 (PST)
X-Received: by 2002:a05:6214:21ae:: with SMTP id t14mr8326129qvc.66.1636654657128;
Thu, 11 Nov 2021 10:17:37 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!fdn.fr!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Thu, 11 Nov 2021 10:17:36 -0800 (PST)
In-Reply-To: <e4b12166-fc2f-47ba-9346-21f9e7ed928cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.28.53.44; posting-account=6oXPhQoAAAA5df4ZzTru9drXwPkbOifd
NNTP-Posting-Host: 89.28.53.44
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com> <269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>
<c621bd0f-6162-4be1-8818-5a15421f9473n@googlegroups.com> <e4b12166-fc2f-47ba-9346-21f9e7ed928cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <069592d2-ba7d-4785-8073-d8db09ac00aen@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: gontiaval@gmail.com (Valeriu Gontia)
Injection-Date: Thu, 11 Nov 2021 18:17:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Valeriu Gontia - Thu, 11 Nov 2021 18:17 UTC

четверг, 11 ноября 2021 г. в 16:49:31 UTC+2, Sam Habiel:
> On Thursday, November 11, 2021 at 5:20:17 AM UTC-7, gont...@gmail.com wrote:
> > четверг, 4 ноября 2021 г. в 21:19:56 UTC+2, Sam Habiel:
> > > On Wednesday, November 3, 2021 at 7:04:03 AM UTC-6, rtweed wrote:
> > > > BTW the fact that there is a one-to-one correspondence between JSON (and XML) and M Globals is the heart of this set of documents:
> > > >
> > > > https://github.com/robtweed/global_storage
> > > >
> > > > and is the basis of the Node.js abstraction of Global Storage into persistent JSON/JavaScript Objects known as QEWD-JSdb:
> > > >
> > > > https://github.com/robtweed/qewd-jsdb
> > > You can try this too: https://github.com/shabiel/M-Web-Server/blob/master/doc/important-utilities.md#json
> > Hello Sam !
> > Why, if numbers appear in a node, I get a different result ???
> >
> > In the same example:
> > S X ("myObj", "booleanT") = "true"
> > S X ("myObj", "booleanF") = "false"
> > S X ("myObj", "numeric") = 3.1416
> > S X ("myObj", "nullValue") = "null"
> > S X ("myObj", "array", 1) = "one"
> > S X ("myObj", "array", 2) = "two"
> > S X ("myObj", "array", 3) = "three"
> > S X ("myObj", "subObject", "fieldA") = "hello"
> > S X ("myObj", "subObject", "fieldB") = "world"
> > JSON (1) = "{" myObj ": {" array ": [" one "," two "," three "]," booleanF ": false," booleanT ": true," nullValue ": null," numeric ":"
> > JSON (2) = "3.1416," subObject ": {" fieldA ":" hello "," fieldB ":" world "}}}"
> >
> > In my case:
> > XX (501, "array", 1) = "one"
> > XX (501, "array", 2) = "two"
> > XX (501, "array", 3) = "three"
> > XX (501, "booleanF") = "false"
> > XX (501, "booleanT") = "true"
> > XX (501, "nullValue") = "null"
> > XX (501, "numeric") = 3.1416
> > XX (501, "subObject", "fieldA") = "hello"
> > XX (501, "subObject", "fieldB") = "world"
> > JSON (1) = "{[{" array ": [" one "," two "," three "]," booleanF ": false," booleanT ": true," nullValue ": null," numeric ": 3.1416 , "
> > JSON (2) = "" subObject ": {" fieldA ":" hello "," fieldB ":" world "}}]}"
> > :
> > It happens to me that the nodes of globals contain only numbers
> > (codes) ...
> The encoder behaves differently if you start with a number (it assumes you want an array) vs not (it will assume that you want an object).
>
> --Sam

I'm testing a Rob Tweed encoder
Get a different result:
s aa = $$ arrayToJSON ^% zewdJSON ("XX")
aa="{"501":{"array":["one","two","three"],"booleanF":false,"booleanT":true,"nullValue":"null","numeric":3.1416,"subObject":{"fieldA":"hello","fieldB":"world"}}}"

Re: How to write JSON to multi-level global?

<1e86bef8-5665-4cd8-ad77-169e70fc7a62n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=241&group=comp.lang.mumps#241

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:570b:: with SMTP id 11mr14277043qtw.128.1636700522288;
Thu, 11 Nov 2021 23:02:02 -0800 (PST)
X-Received: by 2002:a05:622a:58a:: with SMTP id c10mr14037774qtb.336.1636700522142;
Thu, 11 Nov 2021 23:02:02 -0800 (PST)
Path: i2pn2.org!i2pn.org!news.neodome.net!news.ortolo.eu!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Thu, 11 Nov 2021 23:02:01 -0800 (PST)
In-Reply-To: <069592d2-ba7d-4785-8073-d8db09ac00aen@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.28.53.26; posting-account=6oXPhQoAAAA5df4ZzTru9drXwPkbOifd
NNTP-Posting-Host: 89.28.53.26
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com> <269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>
<c621bd0f-6162-4be1-8818-5a15421f9473n@googlegroups.com> <e4b12166-fc2f-47ba-9346-21f9e7ed928cn@googlegroups.com>
<069592d2-ba7d-4785-8073-d8db09ac00aen@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1e86bef8-5665-4cd8-ad77-169e70fc7a62n@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: gontiaval@gmail.com (Valeriu Gontia)
Injection-Date: Fri, 12 Nov 2021 07:02:02 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Valeriu Gontia - Fri, 12 Nov 2021 07:02 UTC

четверг, 11 ноября 2021 г. в 20:17:39 UTC+2, Valeriu Gontia:
> четверг, 11 ноября 2021 г. в 16:49:31 UTC+2, Sam Habiel:
> > On Thursday, November 11, 2021 at 5:20:17 AM UTC-7, gont...@gmail.com wrote:
> > > четверг, 4 ноября 2021 г. в 21:19:56 UTC+2, Sam Habiel:
> > > > On Wednesday, November 3, 2021 at 7:04:03 AM UTC-6, rtweed wrote:
> > > > > BTW the fact that there is a one-to-one correspondence between JSON (and XML) and M Globals is the heart of this set of documents:
> > > > >
> > > > > https://github.com/robtweed/global_storage
> > > > >
> > > > > and is the basis of the Node.js abstraction of Global Storage into persistent JSON/JavaScript Objects known as QEWD-JSdb:
> > > > >
> > > > > https://github.com/robtweed/qewd-jsdb
> > > > You can try this too: https://github.com/shabiel/M-Web-Server/blob/master/doc/important-utilities.md#json
> > > Hello Sam !
> > > Why, if numbers appear in a node, I get a different result ???
> > >
> > > In the same example:
> > > S X ("myObj", "booleanT") = "true"
> > > S X ("myObj", "booleanF") = "false"
> > > S X ("myObj", "numeric") = 3.1416
> > > S X ("myObj", "nullValue") = "null"
> > > S X ("myObj", "array", 1) = "one"
> > > S X ("myObj", "array", 2) = "two"
> > > S X ("myObj", "array", 3) = "three"
> > > S X ("myObj", "subObject", "fieldA") = "hello"
> > > S X ("myObj", "subObject", "fieldB") = "world"
> > > JSON (1) = "{" myObj ": {" array ": [" one "," two "," three "]," booleanF ": false," booleanT ": true," nullValue ": null," numeric ":"
> > > JSON (2) = "3.1416," subObject ": {" fieldA ":" hello "," fieldB ":" world "}}}"
> > >
> > > In my case:
> > > XX (501, "array", 1) = "one"
> > > XX (501, "array", 2) = "two"
> > > XX (501, "array", 3) = "three"
> > > XX (501, "booleanF") = "false"
> > > XX (501, "booleanT") = "true"
> > > XX (501, "nullValue") = "null"
> > > XX (501, "numeric") = 3.1416
> > > XX (501, "subObject", "fieldA") = "hello"
> > > XX (501, "subObject", "fieldB") = "world"
> > > JSON (1) = "{[{" array ": [" one "," two "," three "]," booleanF ": false," booleanT ": true," nullValue ": null," numeric ": 3.1416 , "
> > > JSON (2) = "" subObject ": {" fieldA ":" hello "," fieldB ":" world "}}]}"
> > > :
> > > It happens to me that the nodes of globals contain only numbers
> > > (codes) ...
> > The encoder behaves differently if you start with a number (it assumes you want an array) vs not (it will assume that you want an object).
> >
> > --Sam
> I'm testing a Rob Tweed encoder
> Get a different result:
> s aa = $$ arrayToJSON ^% zewdJSON ("XX")
> aa="{"501":{"array":["one","two","three"],"booleanF":false,"booleanT":true,"nullValue":"null","numeric":3.1416,"subObject":{"fieldA":"hello","fieldB":"world"}}}"

I get the same results Rob Tweed and Winfried Bantel encoder:
XX(501,8924)="true"
XX(501,8925)="false"
XX(501,8926)=3.1416
XX(501,8927)="null"
XX(501,8928,1)="one"
XX(501,8928,2)="two"
XX(501,8928,3)="three"
XX(501,8929,222)="hello"
XX(501,8929,333)="world"
aa="{"501":{"8924":true,"8925":false,"8926":3.1416,"8927":"null","8928":["one","two","three"],"8929":{"222":"hello","333":"world"}}}"
bb="{"501":{"8924":"true","8925":"false","8926":3.1416,"8927":"null","8928":{"1":"one","2":"two","3":"three"},"8929":{"222":"hello","333":"world"}}}"

Sam, i like your approach of splitting the JSON into a one-dimensional array. Ultimately, I can pass a large amount of data to the client in a loop. But this doesn't fit the structure of my globals.
As I showed above, this suits me for my globals. But, here the function returns a string that does not exceed 32 KB, that is, i am limited in transferring data to the client.

Re: How to write JSON to multi-level global?

<fadd55ab-9d62-409c-a683-fb3f72de96acn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=242&group=comp.lang.mumps#242

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ac8:7d92:: with SMTP id c18mr15414728qtd.324.1636722879707;
Fri, 12 Nov 2021 05:14:39 -0800 (PST)
X-Received: by 2002:a05:620a:1902:: with SMTP id bj2mr12589457qkb.526.1636722879548;
Fri, 12 Nov 2021 05:14:39 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Fri, 12 Nov 2021 05:14:39 -0800 (PST)
In-Reply-To: <1e86bef8-5665-4cd8-ad77-169e70fc7a62n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:800:da00:2d66:2ccd:dd84:8f08;
posting-account=7_GEEwoAAAA24F6PVSvhz0uWuZgymXyC
NNTP-Posting-Host: 2a00:23a8:800:da00:2d66:2ccd:dd84:8f08
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com> <269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>
<c621bd0f-6162-4be1-8818-5a15421f9473n@googlegroups.com> <e4b12166-fc2f-47ba-9346-21f9e7ed928cn@googlegroups.com>
<069592d2-ba7d-4785-8073-d8db09ac00aen@googlegroups.com> <1e86bef8-5665-4cd8-ad77-169e70fc7a62n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fadd55ab-9d62-409c-a683-fb3f72de96acn@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: rob.tweed@gmail.com (rtweed)
Injection-Date: Fri, 12 Nov 2021 13:14:39 +0000
Content-Type: text/plain; charset="UTF-8"
 by: rtweed - Fri, 12 Nov 2021 13:14 UTC

What were you expecting the JSON representation of your Global contents to be? My encoder is producing exactly what I'd have expected

Rob

Re: How to write JSON to multi-level global?

<34262510-dc8b-4bd6-8563-2c78e010ba39n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=243&group=comp.lang.mumps#243

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:a37:a790:: with SMTP id q138mr12264583qke.405.1636724145023;
Fri, 12 Nov 2021 05:35:45 -0800 (PST)
X-Received: by 2002:a05:620a:430d:: with SMTP id u13mr12508516qko.93.1636724144883;
Fri, 12 Nov 2021 05:35:44 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Fri, 12 Nov 2021 05:35:44 -0800 (PST)
In-Reply-To: <fadd55ab-9d62-409c-a683-fb3f72de96acn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.28.53.26; posting-account=6oXPhQoAAAA5df4ZzTru9drXwPkbOifd
NNTP-Posting-Host: 89.28.53.26
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com> <269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>
<c621bd0f-6162-4be1-8818-5a15421f9473n@googlegroups.com> <e4b12166-fc2f-47ba-9346-21f9e7ed928cn@googlegroups.com>
<069592d2-ba7d-4785-8073-d8db09ac00aen@googlegroups.com> <1e86bef8-5665-4cd8-ad77-169e70fc7a62n@googlegroups.com>
<fadd55ab-9d62-409c-a683-fb3f72de96acn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <34262510-dc8b-4bd6-8563-2c78e010ba39n@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: gontiaval@gmail.com (Valeriu Gontia)
Injection-Date: Fri, 12 Nov 2021 13:35:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Valeriu Gontia - Fri, 12 Nov 2021 13:35 UTC

пятница, 12 ноября 2021 г. в 15:14:40 UTC+2, rtweed:
> What were you expecting the JSON representation of your Global contents to be? My encoder is producing exactly what I'd have expected
>
> Rob
There are cases in old M implementations when it is necessary to return more than 32 kb to the JSON client
Your decoder is fine, but it returns the maximum line error.
CADRE> d arrayToJSON^%zmgwebUtils ("^CAD")

... ... ... s json = json_value_ ","
^
<MAXSTRING> walkArray + 51 ^% zmgwebUtils

CADRE 15d5>

Sam has everything OK, but the structure is not like yours.
CADRE> d encode ^%zwebjsonEncode ("^CAD","JSON")

CADRE>

Re: How to write JSON to multi-level global?

<b0335a24-e4e2-453f-af9f-3b98b906b2can@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=244&group=comp.lang.mumps#244

  copy link   Newsgroups: comp.lang.mumps
X-Received: by 2002:ad4:4452:: with SMTP id l18mr14986921qvt.8.1636727163275;
Fri, 12 Nov 2021 06:26:03 -0800 (PST)
X-Received: by 2002:a05:622a:1194:: with SMTP id m20mr16758911qtk.175.1636727163035;
Fri, 12 Nov 2021 06:26:03 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.mumps
Date: Fri, 12 Nov 2021 06:26:02 -0800 (PST)
In-Reply-To: <34262510-dc8b-4bd6-8563-2c78e010ba39n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:800:da00:2d66:2ccd:dd84:8f08;
posting-account=7_GEEwoAAAA24F6PVSvhz0uWuZgymXyC
NNTP-Posting-Host: 2a00:23a8:800:da00:2d66:2ccd:dd84:8f08
References: <9a0729bf-3f91-4fe9-91a7-4d05df3b0e8dn@googlegroups.com>
<877ee7c7-29e2-4526-b2d5-59afa7099b70n@googlegroups.com> <269eb705-f28a-455e-ad2d-a680ebdd21b3n@googlegroups.com>
<c621bd0f-6162-4be1-8818-5a15421f9473n@googlegroups.com> <e4b12166-fc2f-47ba-9346-21f9e7ed928cn@googlegroups.com>
<069592d2-ba7d-4785-8073-d8db09ac00aen@googlegroups.com> <1e86bef8-5665-4cd8-ad77-169e70fc7a62n@googlegroups.com>
<fadd55ab-9d62-409c-a683-fb3f72de96acn@googlegroups.com> <34262510-dc8b-4bd6-8563-2c78e010ba39n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b0335a24-e4e2-453f-af9f-3b98b906b2can@googlegroups.com>
Subject: Re: How to write JSON to multi-level global?
From: rob.tweed@gmail.com (rtweed)
Injection-Date: Fri, 12 Nov 2021 14:26:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: rtweed - Fri, 12 Nov 2021 14:26 UTC

You can always reconfigure your M system to increase the maximum size allowed for data. Of course there's also the maximum combined global subscript length issue that can limit JSON to/from global mapping. A good alternative is to use the DOM APIs to map JSON. These are implemented in my EWD source code (see my EWD repo on Github) and in QEWD (implemented as JavaScript APIs). See:

https://github.com/robtweed/global_storage/blob/master/XML_DB.md
https://github.com/robtweed/qewd-jsdb/blob/master/DOM.md (the last sections deal with JSON mapping using the DOM)

Rob

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor