csharp create a json object inline

Code Example - csharp create a json object inline

                
                        { "request_type": "TEMPLATE_ATTRIBUTES", "template_attributes": { "metadata": { "template_name": "ok8", "description": "Creating ct1", "name": "v5", "project": "defaultproject" }, "spec": { "cluster_type": "eks", "blueprint": { "name": "default", "version": "snapshot - 2021-10-26T06:48:30Z" }, "cloud_credential": "jj", "config": { "region": "us-west-2", "version": "1.20", "tags": { "a": "b" }, "nodegroup_name": "name1", "instance_type": "t3.medium", "node_private_networking": false } }, "parameters": { "region": { "override": { "allow": true, "values": ["us-west-1", "us-west-2"] } }, "nodegroup_name": { "override": { "allow": true } } } } }
                    
                
 

newtonsoft create dynamic object

                        
                                dynamic d = Newtonsoft.Json.Linq.JObject.Parse("{number:1000, str:'string', array: [1,2,3,4,5,6]}");