JSON

Syndicate content 16 

Introduction

The field test of Caché 2016.2 has been available for quite some time and I would like to focus on one of the substantial features that is new in this version: the document data model. This model is a natural addition to the multiple ways we support for handling data including Objects, Tables and Multidimensional arrays. It makes the platform more flexible and suitable for even more use cases.

Last comment 15 June 2016
0 11
1739

views

+ 13

rating

I have a Cache classes with %TimeStamp (e.g. 2016-04-18 12:29:11) and %Date (eg. 64027) properties. And I have a javascript client app, which needs full CRUD over this properties.

But in javascript date/time are defined by ISO8601 (e.g. timestamp 2016-04-18T12:29:11Z, date 2016-04-18).

Last answer 20 April 2016
0 3
0

comments

958

views

+ 5

rating

Hi

I have been experimenting with the creation of a set of REST services for an app.  The basic GET operation is set to create a %ZEN.proxyObject instance, and then set an instance of a Persistant class as a property, which gives me all of the values I want to return.  However, it also gives me some values that I don't want to return over REST (because they are both private, and large registered objects which will bog down performance)

How do I remove these values from the ZENproxyObject?  I can only see a full clear() in the documentation, but nothing which can remove individual elements

 

Thanks

Chris

Last answer 30 March 2016 Last comment 30 March 2016
0 2
216

views

+ 2

rating

I am pleased to announce the next 2016.2 field test kit, 2016.2.0.595.0.

It may look like a slow week, with less than fifty changes having been checked in, but this kit includes the following fixes to problems found by you, the ones running the kits in the field:

  • ALE2845, which fixes the cachejdbc.jar version
  • JN1637, which fixes an issue that blocked debugging Atelier when used in conjunction with Kerberos
  • DLP3508, which fixes a JSON issue with $compose()

The rest of the fixes have been spread among different areas of the product, chief among them DOCUMENT Data Model, SQL and Atelier.

Please download the kit and give it a try; the latest field test of 2016.2 is available HERE.  And, as always, we welcome your feedback.

Steve Glassman, Director of QD

0 3
0

comments

136

views

+ 3

rating

Hello,

I am trying to use %ZEN.proxyObject to send out in JSON format so I do:

    set tProxyRequest = ##class(%ZEN.proxyObject).%New()
    set tProxyRequest.notanumber = "28001"
    set tProxyRequest.aboolean = "true"
    
    set tBody = ##class(%GlobalCharacterStream).%New()
    do ##class(Ens.Util.JSON).ObjectToJSONStream(tProxyRequest,.tBody,"aelotwu")
    w tBody.Read()

and I get:

{
        "aboolean":"true",
        "notanumber":28001
}

But I want this:

{
        "aboolean":true,
        "notanumber":"28001"
}

 

Help please !

Last comment 17 February 2016
0 6
0

answers

598

views

0

rating

I'm revisiting some older projects that can benefit from the new JSON support and dynamic object capabilities in 2016.1 FT / 2016.2 FT. (Particularly, some of the really new features in the latest 2016.2 FT.)
For the particular thing I'm working on, it would be very handy to be able to merge objects, similarly to https://api.jquery.com/jquery.extend/. The closest thing I've found so far (in 2016.2 only) is:

Set o1 = {"a":1,"c":2}, o2 = {"b":1,"c":1}
Write "o1: ",o1.$toJSON(),!
Write "o2: ",o2.$toJSON(),!
Write !
Write "Merge two objects into a third (new) object, with values from o2 overwriting those from o1 when property names are shared: ",!
Set o3 = o2.$compose({"returnValue":o1.$clone()})
Write "o3: ",o3.$toJSON(),!
Write "o1: ",o1.$toJSON(),!
Write "o2: ",o2.$toJSON(),!
Write !

Last comment 12 February 2016
0 4
0

answers

241

views

0

rating