forked from benlaurie/objecthash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common_json.test
46 lines (39 loc) · 1.52 KB
/
common_json.test
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
# -*- coding: utf-8 -*-
# Lists with strings
[]
acac86c0e609ca906f632b0e2dacccb2b77d22b0621f20ebece1a4835b93f6f0
["foo"]
268bc27d4974d9d576222e4cdbb8f7c6bd6791894098645a19eeca9c102d0964
["foo", "bar"]
32ae896c413cfdc79eec68be9139c86ded8b279238467c216cf2bec4d5f1e4a2
# Objects with (lists of) strings
{}
18ac3e7343f016890c510e93f935261169d9e3f565436429830faf0934f4f8e4
{"foo": "bar"}
7ef5237c3027d6c58100afadf37796b3d351025cf28038280147d42fdc53b960
{"foo": ["bar", "baz"], "qux": ["norf"]}
f1a9389f27558538a064f3cc250f8686a0cebb85f1cab7f4d4dcc416ceda3c92
# Null values
[null]
5fb858ed3ef4275e64c2d5c44b77534181f7722b7765288e76924ce2f9f7f7db
# Boolean primitives
true
7dc96f776c8423e57a2785489a3f9c43fb6e756876d6ad9a9cac4aa4e72ec193
false
c02c0b965e023abee808f2b548d8d5193a8b5229be6f3121a6f16e2d41a449b3
# Floating point
1.2345
844e08b1195a93563db4e5d4faa59759ba0e0397caf065f3b6bc0825499754e0
-10.1234
59b49ae24998519925833e3ff56727e5d4868aba4ecf4c53653638ebff53c366
# Mixture of all types
["foo", {"bar": ["baz", null, 1.0, 1.5, 0.0001, 1000.0, 2.0, -23.1234, 2.0]}]
783a423b094307bcb28d005bc2f026ff44204442ef3513585e7e73b66e3c2213
# Integers and floats are the same in common JSON
["foo", {"bar": ["baz", null, 1, 1.5, 0.0001, 1000, 2, -23.1234, 2]}]
783a423b094307bcb28d005bc2f026ff44204442ef3513585e7e73b66e3c2213
# Test order independence
{"k1": "v1", "k2": "v2", "k3": "v3"}
ddd65f1f7568269a30df7cafc26044537dc2f02a1a0d830da61762fc3e687057
{"k2": "v2", "k1": "v1", "k3": "v3"}
ddd65f1f7568269a30df7cafc26044537dc2f02a1a0d830da61762fc3e687057