Re-2: O$8.0.3.2 OJSON.$listorrowtojson() - impairs speed

Lars Schärer los at computer-nach-mass.de
Sat Jul 29 04:26:24 EDT 2017


imho it is a waste to transfer the definitions of each (empty) field of EACH row for lists placed into rows.
but i understood this is not a bug, but pure json?

if you use the schemas in the jsclient, what will work is
> {“OrderNumber”: “krsTestOrd9?,”CartonNumber”: “17FX0000027?,”
> PackageType”: “PVS-P-001?,”PackingList”: [{“VariantCode”:
> “701644026622”,”PackedQty”: 1}]}


but not (without some minimal additional code)
> {“OrderNumber”:”P00001005?,”CartonNumber”:”17FX0000029?,”
> PackageType”:”PVS-P-001?,”PackingList”:[[“8300896432544”,1]]}


my workaround is to define PackingList as Charakter
and to use the Backend to produce the JSON (Or my own function to produce the delimited text “8300896432544”,1  ],[   “8300896432545”,2     ],[    “8300896432546”,3

would be great to have a choice
and save a lot of traffic if omnis would use the shorter syntax internally
will result in a LOT MORE SPEED in many situations.

LArs

        processed by David.fx 
Subject: Re: O$8.0.3.2 OJSON.$listorrowtojson() (29-Jul-2017 5:25)
From:    Vik Shah <Vik at Keys2Solutions.com.au>
To:      omnisdev-en at lists.omnis-dev.com


yes I can confirm that that is the behaviour and I think I reported this a while back, cant recall now.

IMHO its a bug.

> On 28 Jul 2017, at 23:49, Rocco Ventura [Kunvi] wrote:
> 
> Hi to all,
> 
> I’m using a JSON call to a customer-server and following the documentaion
> I’ve preparared the Json structure using the static method
> OJSON.$listorrowtojson(), but it seems there is a bug in the result.
> 
> The structure to send is formed by a header and a list-of-rows, so I defined
> a schema for the header and in the last field of it I added a List-field of
> Omnis: here is the header-schema:
> 
> HEADER SCHEMA
> 1) OrderNumber, Character 100
> 2) CartonNumber, Character 100
> 3) PackageType, Character 10
> 4) PickingList, List, subtype=’sx_rows_schema’
> 
> ROWS-SCHEMA: sx_rows_schema
> 1) VariantCode, Char 100
> 2) PackadQty, Integer 32bit
> 
> So, in the Omnin-code I prepare the data and finally I call
> OJSON.$listorrowtojson() but I obtain a structure like the follow…
> 
> {“OrderNumber”:”P00001005?,”CartonNumber”:”17FX0000029?,”
> PackageType”:”PVS-P-001?,”PackingList”:[[“8300896432544”,1]]}
> 
> Instead of this… where there are the fied-name of the rows.
> 
> {“OrderNumber”: “krsTestOrd9?,”CartonNumber”: “17FX0000027?,”
> PackageType”: “PVS-P-001?,”PackingList”: [{“VariantCode”:
> “701644026622”,”PackedQty”: 1}]}
> 
> Do you think there is a bug in OJSON.$listorrowtojson() or I missed
> something!?
> 
> Thanks
> 
> Bye
> 
> Rocco
> 
> _________________________________
> Distinti saluti. Best regards.
> 
> Rocco Dr. Ventura
> WMS Analist and Software Developer
> 
> KUNVI srl - Experiences Holding - www.kunvi.it
> Email: r.ventura at kunvi.it - Mobile: +39 348 5186051
> 
> 
> 
> ---
> Questa e-mail e stata controllata per individuare virus con Avast antivirus.
> https://www.avast.com/antivirus
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com



More information about the omnisdev-en mailing list