I'll elaborate a bit more on ChrisR awesome answer and bring images from his awesome reference.

A valid JSON always starts with either curly braces { or square brackets [, nothing else.

{ will start an object:

{ "key": value, "another key": value }

Hint: although javascript accepts single quotes ', JSON only takes double ones ".

[ will start an array:

[value, value]

Hint: spaces among elements are always ignored by any JSON parser.

And value is an object, array, string, number, bool or null:

So yeah, ["a", "b"] is a perfectly valid JSON, like you could try on the link Manish pointed.

Here are a few extra valid JSON examples, one per block:

{}

[0]

{"__comment": "json doesn't accept comments and you should not be commenting even in this way", "avoid!": "also, never add more than one key per line, like this"}

[{   "why":null} ]

{
  "not true": [0, false],
  "true": true,
  "not null": [0, 1, false, true, {
    "obj": null
  }, "a string"]
}
Answer from cregox on Stack Overflow
🌐
W3Schools
w3schools.com › js › js_json_arrays.asp
JSON Arrays
JS Examples JS HTML DOM JS HTML Input JS HTML Objects JS HTML Events JS Browser JS Editor JS Exercises JS Quiz JS Website JS Syllabus JS Study Plan JS Interview Prep JS Bootcamp JS Certificate JS Reference ... Arrays in JSON are almost the same as arrays in JavaScript. In JSON, array values must be of type string...
Discussions

How do I create a JSON string from an Array?
Hello, So I see plenty of examples on how to take an JSON string the bot got from another service and deserialize it into an array for it to process. But I’m trying to go in the other direction. My bot has gathered various bits of information into an array and I want to encode that into a ... More on forum.uipath.com
🌐 forum.uipath.com
0
0
July 30, 2018
Deserializing a JSON array string into a C# object
How do I define a C# class that will serialize/deserialize to/from the above JSON string? I’ve tried everything I know. I even considered anonymous (i.e., implicitly typed) arrays. The problem seems that the "object" is an array… Therefore, not an object. More on learn.microsoft.com
🌐 learn.microsoft.com
2
0
[Solved] How to manipulate a "string array" in json payload
Hey Guys, I have a question related to the “array”?! function. I want to extract to values of an array (but it actually is a string) - or I don’t know if this is the right word, it’s just a chain of values. The part of the array looks like this: … “data”:“[‘open’, ‘OK’, ... More on forums.losant.com
🌐 forums.losant.com
12
0
July 26, 2017
PowerAutomate: Json Array to String back to array. JSON() returns only first entry
I think I know what you’re trying to do but I think you are approaching it the wrong way maybe or there is some syntax error perhaps. Take a look at this video which should explain it but you have to init var as an array using output of csv inside of a split function and then map those into a table and then use the outputs of that table into whatever you want I think https://youtu.be/lZDTTVnK8vw Maybe I am not understanding but I think this might help More on reddit.com
🌐 r/PowerPlatform
14
4
December 15, 2021
🌐
EDUCBA
educba.com › home › software development › software development tutorials › javascript tutorial › json array of strings
JSON Array of Strings | How JSON Array of String Works? (Examples)
April 14, 2023 - This is a guide to JSON Array of Strings. Here we also discuss the introduction and how json array of string works? along with different examples and its code implementation.
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › what-is-json-array
What is JSON Array? - GeeksforGeeks
July 23, 2025 - JSON array of Strings contains string elements only. For example, the array below has 6 string elements, "Ram", "Shyam", "Radhika", "Akshay", "Prashant" and "Varun", each element is separated with a comma (,).
🌐
IBM
ibm.com › support › pages › creating-json-string-json-object-and-json-arrays-automation-scripts
Creating a JSON String from JSON Object and JSON Arrays in Automation Scripts
# creating a JSON String with an array (directly executed via Run Automation Script button) from com.ibm.json.java import JSONObject, JSONArray from sys import * # method for creating a JSON formatted String including an array within def createJSONstring(): # defining the first child object ch1_obj = JSONObject() ch1_obj.put('CH_FIELD_1', 1) ch1_obj.put('CH_FIELD_2', 'VALUE_2') # defining the second child object ch2_obj = JSONObject() ch2_obj.put('CH_FIELD_1', 2) ch2_obj.put('CH_FIELD_2', 'VALUE_3') # adding child objects to children array ch_arr = JSONArray() ch_arr.add(ch1_obj) ch_arr.add(ch
🌐
ReqBin
reqbin.com › json › uzykkick › json-array-example
What is JSON Array?
June 11, 2022 - The JSON array of strings contains only string elements, where each element is separated by a comma (,). The following is an example of a JSON array storing string values:
🌐
JSON Schema
json-schema.org › understanding-json-schema › reference › array
JSON Schema - array
Here, we'll reuse the example schema above, but set items to false, which has the effect of disallowing extra items in the tuple. ... { "type": "array", "prefixItems": [ { "type": "number" }, { "type": "string" }, { "enum": ["Street", "Avenue", "Boulevard"] }, { "enum": ["NW", "NE", "SW", "SE"] } ], "items": false}
Find elsewhere
🌐
UiPath Community
forum.uipath.com › learning hub › academy feedback
How do I create a JSON string from an Array? - Academy Feedback - UiPath Community Forum
Hello, So I see plenty of examples on how to take an JSON string the bot got from another service and deserialize it into an array for it to process. But I’m trying to go in the other direction. My bot has gathered various bits of information into an array and I want to encode that into a ...
Published   July 30, 2018
🌐
PrepBytes
prepbytes.com › home › arrays › json array: structure and example
JSON Array: Structure and Example
September 22, 2023 - For instance, the array below contains six string items separated by commas: "Ram," "Shyam," "Radhika," "Akshay," "Prashant," and "Varun" (,). ["Ram", "Shyam", "Radhika", "Akshay", "Prashant", "Varun"] JSON Array Example: Here, we’ll give ...
🌐
CodeUtility
blog.codeutility.io › programming › how-to-use-arrays-in-json-with-examples-in-code-5eeef2665f
How to use Arrays in JSON (With Examples in Code) | CodeUtility
September 26, 2025 - Parse JSON string back to array parsed_users = json.loads(json_string) print("Parsed users:", parsed_users)
🌐
Adobe
opensource.adobe.com › Spry › samples › data_region › JSONDataSetSample.html
JSON Data Set Sample
Notice that the names of the columns ... the flattening process, you simply pass an array of strings: var dsExample7 = new Spry.Data.JSONDataSet("../../data/json/object-03.js", { subPaths: [ "image", "thumbnail" ] }); ......
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › functions › json-array-transact-sql
JSON_ARRAY (Transact-SQL) - SQL Server | Microsoft Learn
The following example returns a JSON array with three elements. One element contains a JSON string, another element contains a JSON object and another element contains a JSON array.
🌐
SitePoint
sitepoint.com › blog › javascript › jquery convert json string to array
jquery convert json string to array — SitePoint
February 12, 2024 - Here is an example: var obj = {name: "John", age: 30, city: "New York"}; var json_str = JSON.stringify(obj, null, 2); console.log(json_str); In this example, JSON.stringify() method converts the JavaScript object into a JSON string with indentation of 2 spaces.
🌐
Quora
quora.com › How-do-you-convert-a-JSON-object-into-a-String-Array
How to convert a JSON object into a String Array - Quora
A JavaScript object or value is converted to a JSON string using the JSON.stringify() method, with the option to replace values if a replacer function or replacer array is given, or to include only the specified attributes otherwise.
🌐
Cswr
cswr.github.io › JsonSchema › spec › arrays
Arrays - JSON Schema
Arrays are used to represent ordered sets of values, such as the following sequence of strings: ["Chilean", "Argentinean", "Peruvian", "Colombian"] In this section we specify array's main charasteristics and restrictions that may apply to them using a single JSON Schema document.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-convert-json-string-to-array-of-json-objects-using-javascript
Convert JSON String to Array of JSON Objects in JavaScript - GeeksforGeeks
August 5, 2025 - Using the JSON.parse() method, a JSON string can be easily converted into an array of JSON objects in JavaScript.
Top answer
1 of 2
2

If your array continues with X4,Y4,Z4, you have a problem since, for deserializing the strong type class from the JSON, the array entries should be known. To deserialize the current JSON, use the following classes:

public class Rootobject
{
    public Class1[] Property1 { get; set; }
}

public class Class1
{
    public string X1 { get; set; }
    public string Y1 { get; set; }
    public string Z1 { get; set; }
    public string X2 { get; set; }
    public string Y2 { get; set; }
    public string Z2 { get; set; }
    public string X3 { get; set; }
    public string Y3 { get; set; }
    public string Z3 { get; set; }
}

You may read the JSON dynamically instead of deserializing the array:

    using System.Text.Json.Nodes;
    var jsonString = "[{\"X1\":\"x1\",\"Y1\":\"y1\",\"Z1\":\"z1\"},{\"X2\":\"x2\",\"Y2\":\"y2\",\"Z2\":\"z2\"},{\"X3\":\"x3\",\"Y3\":\"y3\",\"Z3\":\"z3\"}]";
    var jsonObject = JsonNode.Parse(jsonString);
    Console.WriteLine(jsonObject.ToString());
    Console.WriteLine(jsonObject[0]["X1"]);

Alon.

2 of 2
0

Hi @Julio Bello ,

[{"X1":"x1","Y1":"y1","Z1":"z1"},{"X2":"x2","Y2":"y2","Z2":"z2"},{"X3":"x3","Y3":"y3","Z3":"z3"},...]

From the above JSON string, we can see that each property (key-value pair, such as "X1":"x1", "X2":"x2") has a different property name or key value, in this scenario the property is not fixed so we can directly use it as the class's property.

So, for the above JSON string, I suggest you could deserialize it uses a Dictionary, you can refer to the following sample code:

       //required using System.Text.Json;  

        var values = new List>()  
        {  
              new Dictionary()  
                {  
                    {"X1", "x1"},{"Y1", "Y1"},{"Z1", "Z1"}  
                },  
                  new Dictionary()  
                {  
                    {"X2", "x2"},{"Y2", "Y2"},{"Z2", "Z2"}  
                }  
        };   
        var jsonstring = JsonSerializer.Serialize(values);  
        //jsonstring: [{"X1":"x1","Y1":"Y1","Z1":"Z1"},{"X2":"x2","Y2":"Y2","Z2":"Z2"}]  
        var reult1 = JsonSerializer.Deserialize>>(jsonstring);  

        var test = new TestModel()  
        {  
            Item = new List>()  
            {  
                new Dictionary()  
                {  
                    {"X1", "x1"},{"Y1", "Y1"},{"Z1", "Z1"}  
                },  
                  new Dictionary()  
                {  
                    {"X2", "x2"},{"Y2", "Y2"},{"Z2", "Z2"}  
                }  
            }  
        };  

        var jsonstring2 = JsonSerializer.Serialize(test);  
        //josnstring2: {"Item":[{"X1":"x1","Y1":"Y1","Z1":"Z1"},{"X2":"x2","Y2":"Y2","Z2":"Z2"}]}  

        var result2 = JsonSerializer.Deserialize(jsonstring2);  

The TestModel

public class TestModel  
{  
    public List> Item { get; set; }  
}  

The output is like this:

And this sample code:

        var jsonstr = "[{\"X1\":\"x1\",\"Y1\":\"Y1\",\"Z1\":\"Z1\"},{\"X2\":\"x2\",\"Y2\":\"Y2\",\"Z2\":\"Z2\"}]";  

        var result3 = JsonSerializer.Deserialize>>(jsonstr);  

The result:

After that you can find the data from the Dictionary. More detailed information about Dictionary, see Dictionary Class


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Best regards,
Dillion

🌐
RestfulAPI
restfulapi.net › home › json › json array
JSON Array - Multi-dimensional Array in JSON
November 4, 2023 - The array index begins with 0. The square brackets [...] are used to declare JSON array.