Getting unexpected character at line 1 of col 2 on HTTPS whereas on HTTP its working

Same code is working on development portal which is HTTP server whereas on HTTPS server am not able to receive response

JS Code

<script language="javascript" type="text/javascript">
$(document).ready(function() {
  $('.buttonclick').on('click', function (event) {
        var otherPro =$(this).data('id');
        var fillFields = function(){
            type: 'POST', 
            url: "view_employee_details",
            data: ({'id': otherPro}),
            success: function(data){ 
            $.each(data, function (key, value) {
                $( '#' + key ).html( value ); 

    // call the function 

PHP function/url

public function view_employee_details()

        header('Content-Type: application/json');
        $result =$this->db->query("SELECT * FROM employees WHERE id=$employee_id");
            'employee_id'       =>'Employee code: '.$employee['employee_id'],
            'name'    =>'Name: '.$employee['name'],
            'email_id'            =>'Email: '.$employee['email_id'],
            'contact_no'               =>'Contact No:'.$employee['contact_no'] ,
            'designation'                 =>'Designation: '.$employee['designation']
            echo json_encode($data);

I am receiving this response when I debugged

unexpected character at line 1 of column 2 of the JSON data with red dot {"employee_id":"Employee code: 00000000","name":"Name: Adriana Ross-Maugourd","email_id":"Email:","contact_no":"Contact No: +4915158224870","designation":"Designation: NA"}

So how do I get the response ?