-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerateJSON.html
54 lines (47 loc) · 1.65 KB
/
generateJSON.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js1/jquery.json-2.2.min.js"></script>
<script>
$(document).ready(function () {
var obj = {
input:{
mode: "init",
data:{
filename: "barcode.txt",
filedir: "ex_in",
fields: [1, 2, 3]
},
output:{
dir: "ex_out"
},
dims:{
x: 1,
y: 3
},
params:{
tol: 0.1,
h0: 1,
h: 1.5
},
refinement:{
fpfile: "fpfile.fp"
}
}
};
var encoded = $.toJSON(obj);
console.log(encoded);
var jsonp_url = "http://clip.med.yale.edu/flowPeaks/runflow_Peaks.php";
$.getJSON(jsonp_url, {
jsonString: encoded,
rand:Math.random()
}, function(data) {
console.log(data);
});
});
</script>
</head>
<body>
</body>
</html>