2

This may be a long shot, I use Delphi 6, I know D6 is very old, but I write more as a hobby (am I'm not that good either) .

I'm working on a small project to link to Google Calendars, all the responses are in a JSON file format, until now I had never heard of.
I'm trying to work out how to Parse the JSON file, all I can find lots of references to for more modern version of Delphi as it's built in and can handle it.

Anyone out there could point me in the right direction of how handle a JSON file in D6, at this stage I've come to a complete stop !

Thanks in Advance

RRUZ
  • 134,889
  • 20
  • 356
  • 483
  • 1
    JSON did not exist yet when D6 was released. There are plenty of third-party JSON parsers available, such as [lkjson](http://lkjson.sourceforge.net) and [SuperObject](https://github.com/hgourvest/superobject). Or, just write your own parsing code, as [JSON](http://json.org) is a very simple text-based format. – Remy Lebeau Apr 08 '16 at 22:21
  • 1
    Thanks for your reply, I have tried LKJSON and SuperObject but will not work in D6. I have started looking into writing my own parsing, but I can't work out where to start, as I say not the best coder !! – Brian Canning Apr 10 '16 at 16:30
  • 2
    I got uLkJSON working, I had to make a few changes as D6 doesn't support TFormatSettings, and had a problem with it returning integers but up and running now. Have hit a small problem, it turns out that google doesn't return a field if its blank, so VarToStr(items.Child[x].Field['description'].Value) is not always returned in the JSON file if its not used, having trouble working out how to test id the 'description' field exists before trying to use it Thanks, Brian – Brian Canning Apr 12 '16 at 00:17

0 Answers0