David Keith

Forum Replies Created

Viewing 10 reply threads
  • Author
    Posts
    • #54569
      David Keith
      Participant

      Thanks Kim! I look forward to the new capabilities!

      • This reply was modified 6 years, 7 months ago by David Keith.
    • #54557
      David Keith
      Participant

      and the reason is…. the JSON \/Date(1234567891012)\/ is in milliseconds, not seconds. So the result that is returned from calling System.DateUtils.UnixToDateTime should be divided by 1000.

    • #54556
      David Keith
      Participant

      Okay it looks like this is a Unix time epoch. I used System.DateUtils.UnixToDateTime to convert it. Unfortunately the conversion produces the wrong date with a year of 52166… probably an issue at the source.

    • #54553
      David Keith
      Participant

      Thanks for the response Kim.

      Just out of curiosity, does your JSON processor know anything about this date format?:

      “Expired”:”\/Date(1584031516248)\/”

      Is this a “native” JSON date time type that you know how to process?

      Thanks again.

    • #54550
      David Keith
      Participant

      Never mind, I think I have this figured out. Very verbose code requirements.

      json := TkbmMWJSONObject(stream.LoadFromUTF16String(ajsontemplatestring)

      jsonBase := TkbmMWJSONObject(json.PropertyValue[0]);

      TkbmMWJSONNative(jsonBase.PropertyValueByName[‘origin’]).AsString := origin;

      jsonProcesses := TkbmMWJSONArray(jsonOrder.AsArray[‘Processes’]);

      kbmMWJSONNative(TkbmMWJSONObject(jsonProcesses.Values[0]).PropertyValueByName[‘ProcessCode’]).AsString := ProcessCode;

      etc.

      Thanks.

    • #54549
      David Keith
      Participant

      I tried to clean this up a bit but it didn’t post for some reason.

      Among other things, please remove the line that reads

      ‘contrast”‘ +’

      from the JSON packet.

       

    • #54142
      David Keith
      Participant

      Okay so I changed my streamFormat assignment from PersistentFormat to the AllDataFormat; turned off persistence/set Persistent := False;

      In saving with my streamFormat each time a transaction occurs, I get an entire new copy of the table structure AND data appended to the end of the storage file.

      Should I use… two streamFormats? One for creation and one for transactions? Should I… change the settings on the one stream format so that once the table structure is saved it only saves data after that?

      Please advise.

    • #54141
      David Keith
      Participant

      Thank you!

    • #54138
      David Keith
      Participant

      Can someone please approve my license request for kbmMemTable? I can’t compile kbmMW without it and I forgot to request that license approval when I requested the license approval for kbmMW.

      Thanks.

    • #54135
      David Keith
      Participant

      Thank you! I’ll take a look at this and see if this will fit the bill.

      Thanks again!

    • #53993
      David Keith
      Participant

      I tried this with the objectNotation demo. I pasted in the JSON packet. I hit the ‘Parse’ button. I get an access violation.

      Delphi 10.3 Enterprise

      kbmMW 5.06.20

Viewing 10 reply threads