repo.or.cz
/
mootools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Adding grunt command line globally
[mootools.git]
/
Specs
/
Utilities
/
JSON.js
blob
948c1f7fd4ee6c719bef89d9a086d13974e3c5f3
1
/*
2
---
3
name: JSON
4
requires: ~
5
provides: ~
6
...
7
*/
8
9
describe('JSON', function(){
10
11
it('should encode and decode an object', function(){
12
var object = {
13
a: [0, 1, 2],
14
s: "It's-me-Valerio!",
15
u: '\x01',
16
n: 1,
17
f: 3.14,
18
b: false,
19
nil: null,
20
o: {
21
a: 1,
22
b: [1, 2],
23
c: {
24
a: 2,
25
b: 3
26
}
27
}
28
};
29
30
expect(JSON.decode(JSON.encode(object))).toEqual(object);
31
});
32
33
});