How to get the next esturcture in a JSON Object

In the Page 437 of the book TMS Web Core (Holger Flick), explains that "The data tuples are all stored as an array in the data node "ROW" ".

And as example, the author shows something like this:

"ROW": [
   {
      "firstName": "Peter",
      "lastName": "Parker",
      "DOB": "02/10/1965",
      "married": true
   },
   {
      "firstName": "Bruce",
      "lastName": "Banner",  
      "DOB": "06/09/1945",
      "married": false
   },
   {
      "firstName": "Reed",
      "lastName": "Richards",
      "DOB": "07/03/1955",
      "married": true
   }
]

How do I construct this type of JSON?

I've trying and I get the next approximation:

{
   "ROW": [
      {
         "firstName": "Peter",
         "lastName": "Parker",
         "DOB": "02/10/1965",
         "married": true
      },
      {
         "firstName": "Bruce",
         "lastName": "Banner",  
         "DOB": "06/09/1945",
         "married": false
      },
      {
         "firstName": "Reed",
         "lastName": "Richards",
         "DOB": "07/03/1955",
         "married": true
      }
     ] 
}

In which "ROW" is a pair added with the value of the Array.

But I can't achieve it without the external closers.

Afaik, it is not correct without external { }

1 Like

Ok. That I thought. Because I constructed the first one, converting the JSON to a string and adding as text the ROW and his [ ], but when I wanted to convert it to JSON to render it. As a result, the program told me it was not a correct JSON.

Then, I assume that this is an errata in the book.

Extra question. I've seen that the book's author sometimes participates in this forum. Do you know where I can send him the errata I found in the book?

Are all of this style. The book is very good.

Thank's.

https://www.linkedin.com/in/hflick/