Question Thomas Noitz · Jul 8, 2020

Hi everyone,

when I'm using the %JSONExport-function on Caché-Objects containing properties of type %integer, %numeric or %boolean, this properties are all automatically converted to Strings in the JSON-Output.

Is there a way to get around this type-cast?

Example:

Result with %JSONExport:

maxOrderable and maxReserveable are of type %integer, deliverable and assembly of type %boolean. All 4 properties are shown as quoted Strings.

Result with  ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON (same class+properties):

Thanks!

Thomas

11
0 586
Question Thomas Noitz · Apr 3, 2018

Hi guys,

is there an easy way to compare two objects in os?

Example:

I have a registered order-object at runtime. Now I want to call a specific export-service just in the case that sth in this order has changed since the last export. So I have to compare the persisted order-object (last export) with the current order-object.

Ist there an easy way to compare these two objects or do I have to check each object-value separately?

Thanks for your help!

Regards, Thomas

1
0 953
Question Thomas Noitz · Dec 1, 2017

Hi guys,

is there a way to get the Call-Parameter in an UrlMap to call a method that lies in another class?

Example:

I have a generic class 'RestApi' where I define all my routes for the different Rest-Services I offer - in order to get the same URL for every service.

<Route Url="/checkUID/:uid/:supplierid/" Method="GET" Call="checkUID"/>
4
0 736