How can i convert to json :  
I am using the below function, i need to use json object instead of javascript. How i can achieve it?

   

    function ChangeIDToString(strCondition,id)
            {
                if (strCondition.indexOf("AssignedTo") > -1)
                    return GetUserName(id)
                else if (strCondition.indexOf("ClaimStatusId") > -1)
                    return GetClaimStatus(id)
                else if (strCondition.indexOf("ClaimTypeId") > -1)
                    return GetClaimType(id);           
                else
                    return id;
            }