Hello,
I am struggling to get my json file through controller and get action. I
tried with this below;
index('GET', []) ->
{ok,Data} = file:read_file("./ln.json"),
{json,Data}.
and also with;
index('GET', []) ->
{ok,Data} = file:read_file("./ln.json"),
{json,binary_to_list(Data)}.
Clientside:
$.ajax({
type: "GET",
async: false,
beforeSend: function(x) {
if(x && x.overrideMimeType) {
x.overrideMimeType("application/j-son;charset=UTF-8");
}
},
dataType: "json",
success: function(data){
JSON = data
}
});
I can read json file but couldnt send json data to client. Help will be
appreciated.
Thanks
Mert
--
You received this message because you are subscribed to the Google Groups
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit
https://groups.google.com/d/msgid/chicagoboss/f20d5420-8732-4773-ad16-fd8a73577df6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.