ConfigMap with an array of objects

31 Views Asked by At

friends, i'm writing a k8s configmap with a array of objects, but it doesn't convert to json in my .Net app

my JSON example

`

"ApiServices":[
  "Api1": {
     "CircuitBreakerConfiguration":{anything},
     "FallbackConfiguration":{anything}   
       },
  "Api2": {
     "CircuitBreakerConfiguration":{anything},
     "FallbackConfiguration":{anything}
   }
 ] 

what can i do now?

i try this but doesnt work

`

           - Name: "Api1"
             Endpoint: ""
             PolicyConfiguration:
               RetryConfiguration:
                 RetryCount: 2
                 TimeoutInMilliseconds: 1000
           - Name: "Api2"
             Endpoint: ""
             HeaderPropagation: false
             PolicyConfiguration:
               CircuitBreakerConfiguration:
                 HandledEventsAllowedBeforeBreaking: 3
                 DurationOfBreakInMilliseconds: 100000
               RetryConfiguration:
                 RetryCount: 1
                 TimeoutInMilliseconds: 3000
0

There are 0 best solutions below