$.ajax({
url: "API",
type: "POST",
dataType: "html",
data: ({json: JSON.stringify({language: {func: "setLang", args: ["hjg"]}}) }),
beforeSend: function () {
$("div").html("1 sec");
},
success: function (data) {
$("div").html(data);
}
});