title: need to change values of json file using sed
body: <p>I need to change values of JSON file using sed,</p>
  
  <p>I saw a lot of people suggesting using jq, python, or Perl.</p>
  
  <p>But I'm working inside a container and I want it to be as simple as possible so only sed is the needed solution for me.</p>
  
  <p>the JSON file is:</p>
  
  <pre><code>{
    "useCaseName" : "rca",
    "algorithm" : "log-clustering-train",
    "mainClass" : "com.hp.analytics.logclustering.MainTrainer",
    "applicationJar" : "log-clustering-train-1.0.0-SNAPSHOT-jar-with-dependencies.jar",
    "conf" : {
      "spark.driver.memory" : "3gb",
      "spark.executor.memory" : "9gb",
      "spark.executor.userClassPathFirst" : "true",
      "spark.cores.max": "8"
    },
    "schedule" : {
      "period" : "10",
      "timeUnit" : "hours",
      "timeoutPeriodSeconds" : "10800"
    }
  }
  </code></pre>
  
  <p>And I want to change 4 values inside it:</p>
  
  <p>"spark.driver.memory" : "1gb",</p>
  
  <p>"spark.executor.memory" : "1gb",</p>
  
  <p>"spark.cores.max" :"1"</p>
  
  <p>"period" : "15",</p>
  
  <p>So the output will be:</p>
  
  <pre><code>  {
        "useCaseName" : "rca",
        "algorithm" : "log-clustering-train",
        "mainClass" : "com.hp.analytics.logclustering.MainTrainer",
        "applicationJar" : "log-clustering-train-1.0.0-SNAPSHOT-jar-with-dependencies.jar",
        "conf" : {
          "spark.driver.memory" : "1gb",
          "spark.executor.memory" : "1gb",
          "spark.executor.userClassPathFirst" : "true",
          "spark.cores.max": "1"
        },
        "schedule" : {
          "period" : "15",
          "timeUnit" : "hours",
          "timeoutPeriodSeconds" : "10800"
        }
      }
  </code></pre>