Adding grunt command line globally
[mootools.git] / Specs / Utilities / JSON.js
blob948c1f7fd4ee6c719bef89d9a086d13974e3c5f3
1 /*
2 ---
3 name: JSON
4 requires: ~
5 provides: ~
6 ...
7 */
9 describe('JSON', function(){
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                 };
30                 expect(JSON.decode(JSON.encode(object))).toEqual(object);
31         });
33 });