duanpa5237
2016-03-28 08:00
浏览 253
已采纳

我如何解码JSON.stringify中的数据

I am unable to decode json data, Please help me out from this. I am doing json encode from following function in .net:-

function(response){
    var jsonString = JSON.stringify(response.newhtml); //stringify the JSON created

    //Send the json data to server
    //---------------------------
    $.ajax({
        type: "POST",
        url: 'url',
        //dataType:"json",
        data: {
            LiRecData: jsonString
        },
    }).done(function(msg){
        $('#load_indicator_store').hide(); //Hide loading icon

        if(msg == 'Success'){
            $('#status_save').html('<span class="status_ok">Save.</span>');
        }
        else {
            $('#status_save').html('<span class="status_error">An error occurred. Please try again after sometime.</span>');
        }
    });
}

Now below function for decode

Here i am unable to decode this $_POST['LiRecData']

$_POST['LiRecData'] =
"{"LinkedIn_URL": "https://in.linkedin.com/in/abcsingh","Full_Name": "Abc Singh (Abc - 7K Connections)","Headline": "A Senior Recruitment Professional - Connecting Employers with their prospective assets (Employee)","Company": "Charter Global","Location": "New Delhi Area, India","Industry": "Information Technology and Services","Email": "venky.s@interproeurope.com","Phone_Number": "+91-999034656 (Mobile)","Connection_Count": "500+6,336","Photo_URL": "https://media.licdn.com/mpr/mpr/sh1rinknp_400_400/p/3/0105/0b5/352/1ad670e.jpg","Summary": "A Senior Recruitment Professional with over 12+ years of overall experience, majorly in Talent/Client Acquisition, Recruitment, IT Staffing, Business Development, Account Management mainly in Staffing space.<br>
<br>
"Connecting Employers with their prospective assets (Employee)"<br>
<br>
Helped a Recruitment Startup to achieve his goal and vision.<br>
<br>
Connecting Dots and bridging between Talents and Dream Companies...<br>
<br>
My personal specialties include:<br>
<br>
Permanent/Contract IT Recruitment, Developing new strategies, Research, Client Acquisition, Business Development, Account Management, Client/Industry Mapping, Marketing, Business terms negotiation, Lead development, professional networking and Presentations.<br>
<br>
To find out how we can assist you or your business please contact me: <br>
<br>
<br>
Official No: +1-999-999-9933 x 513<br>
Official Email: abcgh@abclobal.com<br>
Personal E-mail: abc@gmail.com<br>
Cell: +91-999999-6656<br>
<br>
<br>
I am a [LION] - feel free to network with me<br>
<br>
Specialties: Winning New Business - Candidate Selection - Candidate Handling - Account Management - Recruitment Process - 360 Recruitment Cycle<br>
<br>
About Me: <br>
Abc Singh (Abc Singh), A Senior Recruitment Professional as an Expert in Recruitment, Technical Hiring, Business Development, Account Management, Client Acquisition, Client Delivery, with experience of 12+ years, adept at creative and cost-effective sourcing strategies with a goal of hiring outstanding candidates.","Work_Experience": [{"Title": "Business Development Manager - Staffing/Client Acquisition/Consulting","Company": "Abc","Date_From": "February 2016","Date_To": "Present","Locality": "New Delhi Area, India // Atlanta, GA","More": "Moving further, involved into the Business Development, Client Acquisition, Account Management, majorly in Staffing, Talent Acquisition, Consulting space for the client across Global market. <br>
"},{"Title": "HeadHunter / Candidate Manager / Researcher / Recruitment Specialist - DACH/UK/Europe.","Company": "Interpro People","Date_From": "August 2013","Date_To": "November 2015","Locality": "London/UK, Noida/India","More": "Recruiting for SAP positions viz; SAP SD, MM, WM/EWM, FI/CO, PP-PI-PM, QM, APO, ABAP/Basis, Business Intelligence experts (SAP BI, SAP BW), SAP BI-IP / Integrated Planning, SAP BusinessObjects and SAP BPC expert candidates and run the EU Enterprise Applications division.<br>
Involved into the 360 Recruitment, Candidate Management, Researching, Industry/Client Mapping. <br>
Using Social and professional Networking site to work ahead of job portals.<br>
Use/Search Innovating method of recruitment and implement within the organization."},{"Title": "Resource Manager","Company": "BeyondTek IT","Date_From": "October 2012","Date_To": "August 2013","Locality": "Placentia, CA 92870","More": "Recruitment, Resourcing, Talent Acquisition, Hiring, Technical Recruitment for IT, Software, Business Process, Product Development, Fortune 500 organizations. <br>
Involved into overall Recruitment."},{"Title": "Asst. Manager - Recruitment","Company": "Knowledge Momentum","Date_From": "August 2010","Date_To": "August 2012","Locality": "Noida &amp; North Atlanta, GA","More": ""},{"Title": "Asst. Manager - Recruitment","Company": "Izar Associates Inc","Date_From": "June 2008","Date_To": "July 2010","Locality": "","More": "Play a key role in this organization for the recruitment, resourcing and Full Recruitment Life Cycle. Known for its services and timely delivery with optimum quality. Handled the recruitment for Fortune 500 Organizations including some are in the list of Top 50 Fortune Clients."},{"Title": "Team Lead - IT Recruitment","Company": "Ling Technologies","Date_From": "March 2007","Date_To": "April 2008","Locality": "","More": ""},{"Title": "SENIOR IT RECRUITER","Company": "DatamanUSA, LLC","Date_From": "February 2006","Date_To": "February 2007","Locality": "","More": ""},{"Title": "Sr. Officer - Consulting","Company": "Tusthi Executive Access And Consultants","Date_From": "2005","Date_To": "2006","Locality": "","More": ""},{"Title": "SR. Customer Response Executive","Company": "Reliance Infostream Pvt Ltd","Date_From": "November 2003","Date_To": "May 2005","Locality": "","More": ""}],"Education": [{"Institution_Name": "Sikkim Manipal University","Degree": "MBA, HRM","Grade": "","Date_From": "2011","Date_To": "2013"},{"Institution_Name": "Chhatrapati Shahu Ji Maharaj University","Degree": "Bachelor of Arts (B.A.), Economics & English Literature","Grade": "","Date_From": "2000","Date_To": "2003"},{"Institution_Name": "Kendriya Vidyalaya","Degree": "10 & 12th, Economics, Geography, English","Grade": "","Date_From": "1985","Date_To": "1997"}]},"Top_Skills": [{"Endorse_Count": "7","Endorse_Name": "Entrepreneurship"},{"Endorse_Count": "44","Endorse_Name": "Business Development"},{"Endorse_Count": "16","Endorse_Name": "Account Management"},{"Endorse_Count": "8","Endorse_Name": "Client Acquisition"},{"Endorse_Count": "90","Endorse_Name": "Screening"},{"Endorse_Count": "85","Endorse_Name": "IT Recruitment"},{"Endorse_Count": "34","Endorse_Name": "Leadership"},{"Endorse_Count": "99+","Endorse_Name": "Talent Acquisition"},{"Endorse_Count": "61","Endorse_Name": "Management"},{"Endorse_Count": "99+","Endorse_Name": "Technical Recruiting"}]}"

function decodedata(){
    $data = utf8_encode($_POST['LiRecData']);
    $data = str_replace("'","",$data);

    $json = json_decode($data, true);
    print_r($json);
}
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新