0

There are examples of JSONs as follows.

The JSON example that we are trying to put in the StringGrid is larger than this original text.

Please tell me how to put JSON in the StringGrid using a for loop or any iteration statement.

{
  "JSON":"FIXED",
  "PARSER":"NOTREADY",
  "TRANJACTION":"0",
  "COUNT":"7",
  "JSON_DATA":
  {
    "TEST1":"1",
    "TEST2":"00000",
    "TEST3":"1",
    "ALPHA":"ABC",
    "BETA":"HI",
    "CHARLIE":"ABC000"
  },
  {
    "TEST1":"2",
    "TEST2":"00000",
    "TEST3":"1",
    "ALPHA":"DEF",
    "BETA":"HELLO",
    "CHARLIE":"ABC001"
  },
  {
    "TEST1":"3",
    "TEST2":"00000",
    "TEST3":"1",
    "ALPHA":"GHI",
    "BETA":"HI",
    "CHARLIE":"ABC002"
  },
  ...
  {
    "TEST1":"7",
    "TEST2":"00000",
    "TEST3":"1",
    "ALPHA":"STU",
    "BETA":"BYE",
    "CHARLIE":"ABC006"
  }
}
Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
손상희
  • 13
  • 3
  • Parsing JSON is not a trivial process. It would be much simpler to use a JSON parser to parse the text then loop through the results. I don't think JSON is built into Delphi 7 so you'll need to grab one from the internet. There a a few programmers who have graciously shared their work for this purpose. I've used this one in the past... https://cc.embarcadero.com/item/27788 – mait Apr 27 '23 at 00:02

0 Answers0