I have an input string that will either be a JSON packet, ala:
{\"PHONE\":\"555-513-4318\",\"FIRSTNAME\":\"Austin\",\"ARTISTID\":\"2\",\"LASTNAME\":
There's not a much shorter way to do this, other than optimizing it just a little:
var data = $("#content").val(); try { data = $.param($.parseJSON(data)); } catch (e) { }
This prevents the potential multiple selector and .val() calls, but the same concept as you're already doing.