title: Springboot read from json file in resources then return exact same data without manipulating data
body: <p>I have a json file that contains static data and i want to create a springboot service that returns the content of that file. Thus far i have managed to just connect to the file but im not sure how to return the json data.</p>
  
  <p>This is the json:</p>
  
  <pre><code>{
  "carrots": [ 1, 2, 5, 10, 12.5, 20, 50 ],
   "apple": [ 100, 500, 750, 900 ],
   "orange": [200, 500, 1000],
   "lemon": [1, 2, 5, 10, 20, 25],
   "peanuts": [200, 500, 1000]
  }
  </code></pre>
  
  <p>This is some schedo code to what i am trying to achieve :</p>
  
  <pre><code>public JsonInformationHereAsReturnType getJsonContent() {
  
      File file = ResourceUtils.getFile("classpath:sample.json");
  
              //Read File Content
              String content = new String(Files.readAllBytes(file.toPath()));
  
      return content;
  }
  </code></pre>
  
  <p>After runing the code i want to just get back the same json i.e</p>
  
  <pre><code>{
  "carrots": [ 1, 2, 5, 10, 12.5, 20, 50 ],
   "apple": [ 100, 500, 750, 900 ],
   "orange": [200, 500, 1000],
   "lemon": [1, 2, 5, 10, 20, 25],
   "peanuts": [200, 500, 1000]
  }
  </code></pre>
  
  <blockquote>
    <p>How do i achieve this result.</p>
  </blockquote>