Getting JSON data using $.post method

Getting JSON data using $.post method

Hi,
I'm learning Ajax. Right now I'm trying to catch some data from a json file and show them using $.post.
However following code is not working.
The same code works if I use $.getJSON instead of $.post.
I know how to bring it to work with $.ajax but I'm keen to know why it doesn't work with $.post ?

HTML:
  1.   <main role="main">
  2.       <button class="btn">Show Data</button>
  3.       <div id="content"></div>
  4.   </main>

JSON (data.josn)
  1. [
  2.   {
  3.     "name":"Barot Bellingham",
  4.     "shortname":"Barot_Bellingham",
  5.   },
  6.   {
  7.     "name":"Jonathan G. Ferrar II",
  8.     "shortname":"Jonathan_Ferrar",
  9.   },
  10.   {
  11.     "name":"Hillary Hewitt Goldwynn-Post",
  12.     "shortname":"Hillary_Goldwynn",
  13.   }
  14. ]

jQuery
  1. $(function() {
  2. $('.btn').on('click', function() {
  3.   $.post('data.json', function(data) {
  4.     var output = "<ul class='result'> ";
  5.     $.each(data, function(key, val) {
  6.       output += "<li>";
  7.       output += val.name;
  8.       output += "</li>";
  9.     });
  10.     output += "</ul>";
  11.     $("#content").html(output);
  12.   });
  13. });
  14. });

Thanks